diff options
Diffstat (limited to 'lib/plugin.js')
-rw-r--r-- | lib/plugin.js | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/lib/plugin.js b/lib/plugin.js index 2af81c6..995385a 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -103,36 +103,7 @@ Plugin.prototype.getResources = function(base) { // Normalize filters and return them Plugin.prototype.getFilters = function() { - var that = this; - - return _.chain(this.infos.filters || {}) - .map(function(func, key) { - if (!_.isString(key)) { - that.book.log.warn.ln("Invalid filter '"+key+"' in plugin '"+that.name+"'"); - return null; - } - - return [ - key, - function() { - var ctx = { - ctx: this.ctx, - book: that.book - }; - var args = Array.prototype.slice.apply(arguments); - var callback = _.last(args); - - Q() - .then(function() { - return func.apply(ctx, args.slice(0, -1)); - }) - .nodeify(callback); - } - ]; - }) - .compact() - .object() - .value(); + return this.infos.filters || {}; }; // Normalize blocks and return them |