.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / node_modules / indent-string / readme.md
1 # indent-string [![Build Status](https://travis-ci.org/sindresorhus/indent-string.svg?branch=master)](https://travis-ci.org/sindresorhus/indent-string)
2
3 > Indent each line in a string
4
5
6 ## Install
7
8 ```
9 $ npm install indent-string
10 ```
11
12
13 ## Usage
14
15 ```js
16 const indentString = require('indent-string');
17
18 indentString('Unicorns\nRainbows', 4);
19 //=> '    Unicorns'
20 //=> '    Rainbows'
21
22 indentString('Unicorns\nRainbows', 4, {indent: '♥'});
23 //=> '♥♥♥♥Unicorns'
24 //=> '♥♥♥♥Rainbows'
25 ```
26
27
28 ## API
29
30 ### indentString(input, [count], [options])
31
32 #### input
33
34 Type: `string`
35
36 String you want to indent.
37
38 #### count
39
40 Type: `number`<br>
41 Default: `1`
42
43 How many times you want `indent` repeated.
44
45 #### options
46
47 Type: `Object`<br>
48
49 ##### indent
50
51 Type: `string`<br>
52 Default: `' '`
53
54 String to use for the indent.
55
56 ##### includeEmptyLines
57
58 Type: `boolean`<br>
59 Default: `false`
60
61 Also indent empty lines.
62
63
64 ## Related
65
66 - [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module
67 - [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string
68
69
70 ## License
71
72 MIT © [Sindre Sorhus](https://sindresorhus.com)