The main export of this module is a function that must be called:
var regex = require('{%= name %}');
console.log(regex());
function interpolate(str, data) {
return str.replace(re(), function(m, prop) {
return data[prop] || prop;
});
}
var str = 'foo ${bar} baz ${quux}';
var data = {bar: 'AAA', quux: 'BBB'};
interpolate(str, data);
//=> 'foo AAA baz BBB'