1 # indent-string [![Build Status](https://travis-ci.org/sindresorhus/indent-string.svg?branch=master)](https://travis-ci.org/sindresorhus/indent-string)
3 > Indent each line in a string
9 $ npm install indent-string
16 const indentString = require('indent-string');
18 indentString('Unicorns\nRainbows', 4);
19 //=> ' Unicorns\n Rainbows'
21 indentString('Unicorns\nRainbows', 4, {indent: '♥'});
22 //=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
28 ### indentString(string, [count], [options])
41 How many times you want `options.indent` repeated.
52 The string to use for the indent.
54 ##### includeEmptyLines
59 Also indent empty lines.
64 - [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module
65 - [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string
70 MIT © [Sindre Sorhus](https://sindresorhus.com)