0.2.4 • Published 7 years ago

bzz v0.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

bzz

Template strings formatter for avoiding indentation side effect. Format string according minimum found identation and passed gitter.

npm version Build Status XO code style

bzz output

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');

// the fist string's line will be removed
const str = bzz(`
    Hello
      world
`);  // <-- the last line will be removed too

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

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.0

7 years ago