UNPKG

shunter

Version:

A Node.js application built to read JSON and translate it into HTML

12 lines (9 loc) 241 B
'use strict'; module.exports = initFilter; function initFilter(dust) { dust.filters.title = function(value) { return value.replace(/\w+/g, function(txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); }; }