Created
January 4, 2013 18:14
-
-
Save kaiquewdev/4454657 to your computer and use it in GitHub Desktop.
Template engine test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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