Package Exports
- jazzon-format
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jazzon-format) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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