UNPKG

549 BTypeScriptView Raw
1import {Options} from 'indent-string';
2
3/**
4[Strip redundant indentation](https://github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string).
5
6@param string - The string to normalize indentation.
7@param count - How many times you want `options.indent` repeated. Default: `0`.
8
9@example
10```
11import redent from 'redent';
12
13redent('\n foo\n bar\n', 1);
14//=> '\n foo\n bar\n'
15```
16*/
17export default function redent(
18 string: string,
19 count?: number,
20 options?: Options
21): string;
22
23export {Options};