source: trip-planner-front/node_modules/cssnano-utils/dist/getMatch.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 423 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = getMatchFactory;
7
8function getMatchFactory(map) {
9 return function getMatch(args) {
10 const match = args.reduce((list, arg, i) => {
11 return list.filter(keyword => keyword[1][i] === arg);
12 }, map);
13
14 if (match.length) {
15 return match[0][0];
16 }
17
18 return false;
19 };
20}
21
22module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.