Is it possible to access lodash (or any other node modules) with in a Jade template.
Here is an use case I need to use Is it possible to access lodash (or any other node modules) with in a Jade template.
Here is an use case I need to use
- userNames = _.pluck(users, 'user');
ul
each name in userNames
li= name
You could pass Lodash to Jade directly through the data
field in options.
options: {
data: function(dest, src) {
return {
_: require('lodash')
};
}
}