Minimalist mustache template replacement
npm install maxstache-variable-injection{{ var }} has been made customizable
sh
$ npm install maxstache-variable-injection
`
Usage
`js
const maxstache = require("maxstache-variable-injection");
const str = "My name is {{name}}";
const ctx = { name: "jjjohnny" };
const pattern = "{{\\s([^{}\\s]+)\\s}}";
maxstache(str, ctx, pattern);
// => 'My name is jjjohnny'
`
API
$3
Replace {{}} style variables in a string with values from a context.
Variable replacement doesn't escape values.
FAQ
$3
minstache was built as a minimalist replacement for mustache, but is
unfortunately no longer maintained. This package is built as a smaller, faster
alternative to minstache` that makes no assumptions about the file types (e.g.