ES6 Dynamic Templates

Simple dynamic ES6 templates
Actual real ES6 templates. Just dynamic.
Why would I want to make ES6 templates dynamically?
Because you have a whole bunch of templates, and don't want to write a function for every possible template string. The purpose of the module is that variables are resolved later, which makes it easier to do dynamic templating. This is surprisingly tricky as
this for TemplateStrings is a bit weird.
$3
Version 1 used
eval, requiring you to sanitise user input before use. While that's a commopn expectation for web development, the new version uses a regex based approach while keeping the same API.
$3
Load the module:
const fillTemplate = require('es6-dynamic-template');
Use it (use regular quotes, not backticks, for template string):
const greeting = fillTemplate('Hi ${firstName}', {firstName: 'Joe'});
Returns:
'Hi Joe'
$3
mocha
$3
Everything works, AFAIK, if it doesn't, send a PR rather than complaining otherwise I will mock you.