🔧
This commit is contained in:
7
node_modules/picomatch/lib/picomatch.js
generated
vendored
7
node_modules/picomatch/lib/picomatch.js
generated
vendored
@@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const scan = require('./scan');
|
||||
const parse = require('./parse');
|
||||
const utils = require('./utils');
|
||||
@@ -49,7 +48,7 @@ const picomatch = (glob, options, returnState = false) => {
|
||||
}
|
||||
|
||||
const opts = options || {};
|
||||
const posix = utils.isWindows(options);
|
||||
const posix = opts.windows;
|
||||
const regex = isState
|
||||
? picomatch.compileRe(glob, options)
|
||||
: picomatch.makeRe(glob, options, false, true);
|
||||
@@ -158,9 +157,9 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
||||
* @api public
|
||||
*/
|
||||
|
||||
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
||||
picomatch.matchBase = (input, glob, options) => {
|
||||
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
||||
return regex.test(path.basename(input));
|
||||
return regex.test(utils.basename(input));
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user