redent
- Version 4.0.0
- Published
- 3.85 kB
- 2 dependencies
- MIT license
Install
npm i redent
yarn add redent
pnpm add redent
Overview
Strip redundant indentation and indent the string
Index
Functions
Functions
function redent
redent: (string: string, count?: number, options?: Options) => string;
[Strip redundant indentation](https://github.com/sindresorhus/strip-indent) and [indent the string](https://github.com/sindresorhus/indent-string).
Parameter string
The string to normalize indentation.
Parameter count
How many times you want
options.indent
repeated. Default:0
.Example 1
import redent from 'redent';redent('\n foo\n bar\n', 1);//=> '\n foo\n bar\n'
Package Files (1)
Dependencies (2)
Dev Dependencies (3)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/redent
.
- Markdown[](https://www.jsdocs.io/package/redent)
- HTML<a href="https://www.jsdocs.io/package/redent"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2688 ms. - Missing or incorrect documentation? Open an issue for this package.