getMatch.js 385 B

1234567891011121314
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = getMatchFactory;
  4. function getMatchFactory(mappings) {
  5. return function getMatch(args) {
  6. return args.reduce(function (list, arg, i) {
  7. return list.filter(function (keyword) {
  8. return keyword[1][i] === arg;
  9. });
  10. }, mappings);
  11. };
  12. }
  13. module.exports = exports["default"];