Skip to content

Instantly share code, notes, and snippets.

@friggeri
Created August 2, 2010 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save friggeri/504889 to your computer and use it in GitHub Desktop.
Save friggeri/504889 to your computer and use it in GitHub Desktop.
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