dustjs-helper-stringify

JSON Stringify helper for Dust.js

Usage no npm install needed!

<script type="module">
  import dustjsHelperStringify from 'https://cdn.skypack.dev/dustjs-helper-stringify';
</script>

README

JSON Stringify helper for Dust.js

Give dust.js ability to pretty print JSON with space.

Turn

{"any":"json","that":"hard","to":"read"}

into something like

{
  "any": "json",
  "that": "hard",
  "to": "read"
}

For Node.js

var dust = require('dustjs-linkedin');
require('dustjs-helpers');
require('dustjs-helper-stringify');

Use in Dust template

<pre>
    {@stringify value="{myDate|js|s}" space="2"/}
</pre>

License

MIT license