montag
format multiline strings using tagged templates, instead of puting all lines into an array and joining to a string
Last updated 5 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install montag 
SYNC missed versions from official npm registry.

Montag License NPM version Dependency Status Build Status Coverage

“If you don’t want a house built, hide the nails and wood. If you don’t want a man unhappy politically, don’t give him two sides to a question to worry him; give him one. Better yet, give him none.”

Format multiline strings using tagged templates, instead of puting all lines into an array and joining to a string.

Install

npm i montag

How to use?

const montag = require('montag');

const str1 = montag`
    if (a > b)
        console.log(c);
`;

const str2 = [
    'if (a > b)',
    '    console.log(c)',
].join('\n');

str1 === str2;
// returns
true;

License

MIT

Current Tags

  • 1.2.1                                ...           latest (3 years ago)

4 Versions

  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (11)

© 2010 - cnpmjs.org x YWFE | Home | YWFE