Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var swift = require('./lib/swift');
swift.compile('{#users}{name} | {lowercase}\n{/users}', {
users:[
{name:'John'},
{name:'Jack'}
],
lowercase:function(){
return this.name.toLowerCase()
}
}, function(err, result){
console.log(result);
/*
John | john
Jack | jack
*/
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.