Skip to content

Commit c53dda0

Browse files
committed
upgrade packages
1 parent cc88293 commit c53dda0

File tree

3 files changed

+3084
-2012
lines changed

3 files changed

+3084
-2012
lines changed

dist/vue-wait.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/matcher.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,7 @@ function makeRe(pattern, options) {
3333
return re;
3434
}
3535

36-
module.exports = (inputs, patterns, options) => {
37-
if (!(Array.isArray(inputs) && Array.isArray(patterns))) {
38-
throw new TypeError(
39-
`Expected two arrays, got ${typeof inputs} ${typeof patterns}`
40-
);
41-
}
42-
43-
if (patterns.length === 0) {
44-
return inputs;
45-
}
46-
47-
const firstNegated = patterns[0][0] === '!';
48-
49-
patterns = patterns.map(x => makeRe(x, options));
50-
51-
const ret = [];
52-
53-
for (const input of inputs) {
54-
// If first pattern is negated we include everything to match user expectation
55-
let matches = firstNegated;
56-
57-
for (const pattern of patterns) {
58-
if (pattern.test(input)) {
59-
matches = !pattern.negated;
60-
}
61-
}
62-
63-
if (matches) {
64-
ret.push(input);
65-
}
66-
}
67-
68-
return ret;
69-
};
70-
71-
module.exports.isMatch = (input, pattern, options) => {
36+
export const isMatch = (input, pattern, options) => {
7237
const re = makeRe(pattern, options);
7338
const matches = re.test(input);
7439
return re.negated ? !matches : matches;

0 commit comments

Comments
 (0)