Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Custom Jade tags
doctype html
html
head
title Hi
body
div
span= formatDate('Dec 25, 1995')
var j = require('jade'),
m = require('moment');
var locals = {
formatDate: function( str ) {
return m(str).format();
}
};
console.log(j.compileFile('index.jade')(locals));
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.