bzz
Template strings formatter for avoiding indentation side effect. Format string according minimum found identation and passed gitter.
Installation
npm install --save bzz
API
bzz(templateString, [defaultGitter]);
defaultGitter set a minimum identation for passed string. Default: 0
Usage examples
const bzz = require('bzz');
const str = bzz(`
Hello
world
`);
console.log(str);
Output:
Hello
world
const bzz = require('bzz');
const str = bzz(` this line will be removed so not affect anything
Meow
Moo
Arf-arf
`, 2);
console.log(str);
Output:
Meow
Moo
Arf-arf
Author
Dmitry Pavlovsky