TwitchBot/node_modules/jade/lib/filters-client.js
2014-02-24 09:27:12 -06:00

15 lines
346 B
JavaScript

'use strict';
module.exports = filter;
function filter(name, str, options) {
if (typeof filter[name] === 'function') {
var res = filter[name](str, options);
} else {
throw new Error('unknown filter ":' + name + '"');
}
return res;
}
filter.exists = function (name, str, options) {
return typeof filter[name] === 'function';
};