UNPKG

ksa

Version:

Attempt at a browset package manager

21 lines (17 loc) 372 B
var chalk = require('chalk'); var templateColors = [ 'yellow', 'green', 'cyan', 'red', 'white', 'magenta' ]; function colors(Handlebars) { templateColors.forEach(function (color) { Handlebars.registerHelper(color, function (context) { return chalk[color](context.fn(this)); }); }); } module.exports = colors;