Skip to content

Instantly share code, notes, and snippets.

@kaiquewdev
Created January 4, 2013 18:14
Show Gist options
  • Select an option

  • Save kaiquewdev/4454657 to your computer and use it in GitHub Desktop.

Select an option

Save kaiquewdev/4454657 to your computer and use it in GitHub Desktop.
Template engine test
var template = require('./template-engine');
template.engine.filter.add('sum', function (a, b) {
return Number(a) + Number(b);
});
var context = 'A soma de 5 + 5 é igual à {{sum(5, 5)}}';
console.log( template.engine.context.change(context, {}) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment