UNPKG

@beelab/deployer

Version:

Deployer tools

14 lines (11 loc) 299 B
const parse = function(value, container) { if (Array.isArray(value)) { return value.map(el => parse(el, container)); } return String(value).replace(/{{([\w\s]+)}}/ig, function(full, group) { return container.get(group.trim()); }); } module.exports = { parse };