Basic templating by interpolating values into placeholders.
npm install interpol8
const interpolate = require('interpol8')
interpolate(
'Hello, {{place}}',
{place: 'world'}
) // -> 'Hello, world'
// nested, arrays, brackets, dots, whatever, it all works as one would expect
interpolate(
'Hello, {{[0].foo.bar["places"][1]}}',
[{foo: bar: {{places: ['', 'world']}}}]
) // -> 'Hello, world'
// custom delimiters
interpolate(
'Hello, <% place %>',
{place: 'world'},
{left: '<%', right: '%>'}
) // -> 'Hello, world'
template: string
data: object
options: object
left: string, {{
left delimiterright: string, }}
right delimiter