diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-27 17:36:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-27 17:36:13 +0200 |
commit | 5f466137ad6ac596600e3ff53c9b786815398445 (patch) | |
tree | f914c221874f0b16bf3def7ac01d59d1a99a3b0b /node_modules/indent-string/readme.md | |
parent | c9f5ac8e763eda19aa0564179300cfff76785435 (diff) |
node_modules, clean up package.json
Diffstat (limited to 'node_modules/indent-string/readme.md')
-rw-r--r-- | node_modules/indent-string/readme.md | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/node_modules/indent-string/readme.md b/node_modules/indent-string/readme.md index 89f14acd4..bc4745600 100644 --- a/node_modules/indent-string/readme.md +++ b/node_modules/indent-string/readme.md @@ -13,39 +13,42 @@ $ npm install --save indent-string ## Usage ```js -var indentString = require('indent-string'); +const indentString = require('indent-string'); -indentString('Unicorns\nRainbows', '♥', 4); -//=> ♥♥♥♥Unicorns -//=> ♥♥♥♥Rainbows +indentString('Unicorns\nRainbows', 4); +//=> ' Unicorns' +//=> ' Rainbows' + +indentString('Unicorns\nRainbows', 4, '♥'); +//=> '♥♥♥♥Unicorns' +//=> '♥♥♥♥Rainbows' ``` ## API -### indentString(string, indent, count) - -#### string - -**Required** -Type: `string` - -The string you want to indent. +### indentString(input, [count], [indent]) -#### indent +#### input -**Required** Type: `string` -The string to use for the indent. +String you want to indent. #### count -Type: `number` +Type: `number`<br> Default: `1` How many times you want `indent` repeated. +#### indent + +Type: `string`<br> +Default: `' '` + +String to use for the indent. + ## Related @@ -55,4 +58,4 @@ How many times you want `indent` repeated. ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) |