wallet-core/node_modules/indent-string
2017-05-27 17:36:13 +02:00
..
index.js node_modules, clean up package.json 2017-05-27 17:36:13 +02:00
license add node_modules to address #4364 2016-10-10 03:43:44 +02:00
package.json node_modules, clean up package.json 2017-05-27 17:36:13 +02:00
readme.md node_modules, clean up package.json 2017-05-27 17:36:13 +02:00

indent-string Build Status

Indent each line in a string

Install

$ npm install --save indent-string

Usage

const indentString = require('indent-string');

indentString('Unicorns\nRainbows', 4);
//=> '    Unicorns'
//=> '    Rainbows'

indentString('Unicorns\nRainbows', 4, '♥');
//=> '♥♥♥♥Unicorns'
//=> '♥♥♥♥Rainbows'

API

indentString(input, [count], [indent])

input

Type: string

String you want to indent.

count

Type: number
Default: 1

How many times you want indent repeated.

indent

Type: string
Default: ' '

String to use for the indent.

License

MIT © Sindre Sorhus