.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / node_modules / strip-indent / readme.md
1 # strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent)
2
3 > Strip leading whitespace from each line in a string
4
5 The line with the least number of leading whitespace, ignoring empty lines, determines the number to remove.
6
7 Useful for removing redundant indentation.
8
9
10 ## Install
11
12 ```
13 $ npm install --save strip-indent
14 ```
15
16
17 ## Usage
18
19 ```js
20 const stripIndent = require('strip-indent');
21
22 const str = '\tunicorn\n\t\tcake';
23 /*
24         unicorn
25                 cake
26 */
27
28 stripIndent('\tunicorn\n\t\tcake');
29 /*
30 unicorn
31         cake
32 */
33 ```
34
35
36 ## Related
37
38 - [strip-indent-cli](https://github.com/sindresorhus/strip-indent-cli) - CLI for this module
39 - [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string
40
41
42 ## License
43
44 MIT © [Sindre Sorhus](https://sindresorhus.com)