diff --git a/lib/index.js b/lib/index.js index fdb9da9..578a30d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -149,8 +149,12 @@ module.exports = function(opts) { // compose them together into one function var filter = filterlist.reduce(compose); + // check match for filter options object + var options = match.match('{([^}]*)}') || ["{}"]; + options = JSON.parse(options[0]); + // and apply the composed function to the stringified content - return filter(String(includeContent)); + return filter(String(includeContent), options); } };