indento ![Support this project](http://i.imgur.com/6cMbHOC.png)
Indent strings.
Installation
$ npm i --save indento
Example
const indento = require("indento");
console.log(indento("Hello World", 4));
console.log(indento("Hello\nMars", 1));
console.log(indento("Hello\nPluto", 2, "a"));
Documentation
indento(input, width, char)
Indents the input string.
Params
- String
input
: The input string. - Number
width
: The indent width. - String
char
: The character to use for indentation (default: " "
).
Return
- String The indented string.
How to contribute
Have an idea? Found a bug? See how to contribute.
Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
License
MIT © Ionică Bizău