array-includes-with-glob 3.0.15 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name array-includes-with-glob
|
|
3
3
|
* @fileoverview Like _.includes but with wildcards
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.16
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/array-includes-with-glob/}
|
|
@@ -19,7 +19,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
19
|
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
20
20
|
var matcher__default = /*#__PURE__*/_interopDefaultLegacy(matcher);
|
|
21
21
|
|
|
22
|
-
var version$1 = "3.0.
|
|
22
|
+
var version$1 = "3.0.16";
|
|
23
23
|
|
|
24
24
|
var version = version$1;
|
|
25
25
|
var defaults = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name array-includes-with-glob
|
|
3
3
|
* @fileoverview Like _.includes but with wildcards
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.16
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/array-includes-with-glob/}
|
|
@@ -131,7 +131,7 @@ var isMatch = (inputs, patterns, options) => {
|
|
|
131
131
|
};
|
|
132
132
|
matcher.isMatch = isMatch;
|
|
133
133
|
|
|
134
|
-
var version$1 = "3.0.
|
|
134
|
+
var version$1 = "3.0.16";
|
|
135
135
|
|
|
136
136
|
const version = version$1;
|
|
137
137
|
const defaults = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name array-includes-with-glob
|
|
3
3
|
* @fileoverview Like _.includes but with wildcards
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.16
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/array-includes-with-glob/}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import matcher from 'matcher';
|
|
11
11
|
|
|
12
|
-
var version$1 = "3.0.
|
|
12
|
+
var version$1 = "3.0.16";
|
|
13
13
|
|
|
14
14
|
const version = version$1;
|
|
15
15
|
const defaults = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name array-includes-with-glob
|
|
3
3
|
* @fileoverview Like _.includes but with wildcards
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.16
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/array-includes-with-glob/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arrayIncludesWithGlob={})}(this,(function(e){"use strict";const t=new Map;function n(e,t){if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter((e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0}))}function r(e,n){n={caseSensitive:!1,...n};const r=e+JSON.stringify(n);if(t.has(r))return t.get(r);const s="!"===e[0];s&&(e=e.slice(1)),e=(e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")})(e).replace(/\\\*/g,"[\\s\\S]*");const i=new RegExp(`^${e}$`,n.caseSensitive?"":"i");return i.negated=s,t.set(r,i),i}var s=(e,t,s)=>{if(e=n(e,"inputs"),0===(t=n(t,"patterns")).length)return[];const i="!"===t[0][0];t=t.map((e=>r(e,s)));const o=[];for(const n of e){let e=i;for(const r of t)r.test(n)&&(e=!r.negated);e&&o.push(n)}return o};s.isMatch=(e,t,s)=>(e=n(e,"inputs"),0!==(t=n(t,"patterns")).length&&e.some((e=>t.every((t=>{const n=r(t,s),i=n.test(e);return n.negated?!i:i})))));const i={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};e.defaults=i,e.includesWithGlob=function(e,t,n){if(!e.length||!t.length)return!1;const r={...i,...n},o="string"==typeof e?[e]:Array.from(e);return"string"==typeof t?o.some((e=>s.isMatch(e,t,{caseSensitive:r.caseSensitive}))):"any"===r.arrayVsArrayAllMustBeFound?t.some((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive}))))):t.every((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive})))))},e.version="3.0.
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arrayIncludesWithGlob={})}(this,(function(e){"use strict";const t=new Map;function n(e,t){if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter((e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0}))}function r(e,n){n={caseSensitive:!1,...n};const r=e+JSON.stringify(n);if(t.has(r))return t.get(r);const s="!"===e[0];s&&(e=e.slice(1)),e=(e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")})(e).replace(/\\\*/g,"[\\s\\S]*");const i=new RegExp(`^${e}$`,n.caseSensitive?"":"i");return i.negated=s,t.set(r,i),i}var s=(e,t,s)=>{if(e=n(e,"inputs"),0===(t=n(t,"patterns")).length)return[];const i="!"===t[0][0];t=t.map((e=>r(e,s)));const o=[];for(const n of e){let e=i;for(const r of t)r.test(n)&&(e=!r.negated);e&&o.push(n)}return o};s.isMatch=(e,t,s)=>(e=n(e,"inputs"),0!==(t=n(t,"patterns")).length&&e.some((e=>t.every((t=>{const n=r(t,s),i=n.test(e);return n.negated?!i:i})))));const i={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};e.defaults=i,e.includesWithGlob=function(e,t,n){if(!e.length||!t.length)return!1;const r={...i,...n},o="string"==typeof e?[e]:Array.from(e);return"string"==typeof t?o.some((e=>s.isMatch(e,t,{caseSensitive:r.caseSensitive}))):"any"===r.arrayVsArrayAllMustBeFound?t.some((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive}))))):t.every((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive})))))},e.version="3.0.16",Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "array-includes-with-glob",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"description": "Like _.includes but with wildcards",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"core-js": "^3.10.0",
|
|
110
110
|
"cross-env": "^7.0.3",
|
|
111
111
|
"eslint": "^7.23.0",
|
|
112
|
-
"lect": "^0.16.
|
|
112
|
+
"lect": "^0.16.16",
|
|
113
113
|
"rollup": "^2.44.0",
|
|
114
114
|
"rollup-plugin-ascii": "^0.0.3",
|
|
115
115
|
"rollup-plugin-banner": "^0.2.1",
|