indent

Indents a string.

Usage no npm install needed!

<script type="module">
  import indent from 'https://cdn.skypack.dev/indent';
</script>

README

Indent

Build Status NPM version NPM license

Indent a string.

Install

npm install indent

Usage

var indent = require('indent');

indent('hello\nworld', 2);
// "  hello\n  world"

indent('hello\nworld', '  ');
// "  hello\n  world"

indent('hello\nworld');
// "  hello\n  world"

indent('hello\nworld', '\t');
// "\thello\n\tworld"