Skip to content

Instantly share code, notes, and snippets.

@dmachi
Created September 27, 2010 17:07
Show Gist options
  • Save dmachi/599385 to your computer and use it in GitHub Desktop.
Save dmachi/599385 to your computer and use it in GitHub Desktop.
if (response.status > 400) {
//print("Error Response: " + response.status);
template = templateEngine.compile("/error/"+response.status);
}else{
template = templateEngine.compile(templateId, (mediaParams && mediaParams.template));
}
return {
forEach: function(write){
return when(template, function(template){
write(template(object));
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment