Skip to content

Instantly share code, notes, and snippets.

@sayrer
Forked from anonymous/gist:1484531
Created December 21, 2011 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sayrer/1504888 to your computer and use it in GitHub Desktop.
Save sayrer/1504888 to your computer and use it in GitHub Desktop.
Rendering
// require hogan
var hogan = require("hogan.js");
// compile template
var template = hogan.compile("@{{name}}");
var team = ['dhg', 'fat', 'jimio', 'nickgreen', 'sayrer'];
team.map(function (twitterer) {
// Render context to template
return template.render({name: twitterer });
});
// outputs "Follow: @dhg @fat @jimio @nickgreen @sayrer!"
console.log('Follow: ' + team.join(' ') + '!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment