File: index.d.ts

package info (click to toggle)
node-redent 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 128 kB
  • sloc: javascript: 19; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import {Options as IndentStringOptions} from 'indent-string';

declare namespace redent {
	type Options = IndentStringOptions;
}

/**
[Strip redundant indentation](https://github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string).

@param string - The string to normalize indentation.
@param count - How many times you want `options.indent` repeated. Default: `0`.

@example
```
import redent = require('redent');

redent('\n  foo\n    bar\n', 1);
//=> '\n foo\n   bar\n'
```
*/
declare function redent(
	string: string,
	count?: number,
	options?: redent.Options
): string;

export = redent;