summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/redent/readme.md
blob: 67d93e1b325dc402fbcfdaa9d5a87ee20b84eb3c (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# redent [![Build Status](https://travis-ci.org/sindresorhus/redent.svg?branch=master)](https://travis-ci.org/sindresorhus/redent)

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


## Install

```
$ npm install --save redent
```


## Usage

```js
const redent = require('redent');

redent('\n  foo\n    bar\n', 1);
//=> '\n foo\n   bar\n'
```


## API

### redent(input, [count], [indent])

#### input

Type: `string`

#### count

Type: `number`<br>
Default: `0`

How many times you want `indent` repeated.

#### indent

Type: `string`<br>
Default: `' '`

String to use for the indent.


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)