redent (3.0.0)
Published 2026-02-24 14:04:09 +00:00 by atheaadmin
Installation
registry=npm install redent@3.0.0"redent": "3.0.0"About this package
redent 
Install
$ npm install redent
Usage
const redent = require('redent');
redent('\n foo\n bar\n', 1);
//=> '\n foo\n bar\n'
API
redent(string, [count], [options])
string
Type: string
The string to normalize indentation.
count
Type: number
Default: 0
How many times you want options.indent repeated.
options
Type: object
indent
Type: string
Default: ' '
The string to use for the indent.
includeEmptyLines
Type: boolean
Default: false
Also indent empty lines.
License
MIT © Sindre Sorhus
Dependencies
Dependencies
| ID | Version |
|---|---|
| indent-string | ^4.0.0 |
| strip-indent | ^3.0.0 |
Development Dependencies
| ID | Version |
|---|---|
| ava | ^1.4.1 |
| tsd | ^0.7.2 |
| xo | ^0.24.0 |
Keywords
string
strip
trim
indent
indentation
add
reindent
normalize
remove
whitespace
space
Details
Assets (1)
Versions (2)
View all
redent-3.0.0.tgz
1.8 KiB