compile is a method to perform simple replacements in JavaScript.
var compile = require("compile")
You can pass :
If arguments.length
exceeds 2, arguments are used as primary keys.
compile("{{0}} - {{1}} - {{2}}", "foo", "bar", "baz")
/* -> */ "foo - bar - baz"
compile("{{0}} - {{1}} - {{2}}", ["foo", "bar", "baz"])
/* -> */ "foo - bar - baz"
compile("this is {{*}}", "foo")
/* -> */ "this is foo"
compile("{{foo}} {{bar.baz}}!", {foo:"hello", bar:{baz:"yourself"}})
/* -> */ "hello yourself!"