UNPKG
fill-tpl
Version:
latest (1.0.0)
1.0.0
Fill text template
github.com/ReeganExE/fill-tpl
ReeganExE/fill-tpl
fill-tpl
/
index.js
7 lines
(5 loc)
•
211 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
fillTemplate =
require
(
'es6-dynamic-template'
);
/** * Ex: fill('something went ${GOOD}').with({ GOOD: 'wrong' }); */
module
.
exports
=
(
template
) =>
({
with
:
object
=>
fillTemplate
(template,
object
) });