UNPKG

pourover

Version:

A library for simple, fast filtering and sorting of large collections in the browser

11 lines (9 loc) 233 B
'use strict'; module.exports = filter; function filter(name, str, options) { if (typeof filter[name] === 'function') { return filter[name](str, options); } else { throw new Error('unknown filter ":' + name + '"'); } }