Neural Processing Mechanisms
Have ideas to improve npm?Join in the discussion! »

jazzon-format

1.0.0 • Public • Published

jazzon-format

Format strings using util.format

Usage

Here is an example where we're using it together with jazzon-faker to wrap a lipsum text in p tags.

const jazzon = require('jazzon');
const faker = require('jazzon-faker');
const format = require('jazzon-format');
const json = { title: '@{ lorem.sentences(3) | format(<p>%s</p>) }' };

jazzon
  .use(faker())
  .use(format())
  .compile(json)
  .then((result) => {
    console.log(result); // => { "title": "<p>Lorem ipsum dolor sit…</p>" }
  });

Licence

MIT

Install

npm i jazzon-format

DownloadsWeekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar