array-pull-all-with-glob 6.0.3 → 6.0.4
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-pull-all-with-glob
|
|
3
3
|
* @fileoverview Like _.pullAll but with globs (wildcards)
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.4
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/array-pull-all-with-glob/}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { isMatch } from 'matcher';
|
|
11
11
|
|
|
12
|
-
var version$1 = "6.0.
|
|
12
|
+
var version$1 = "6.0.4";
|
|
13
13
|
|
|
14
14
|
const version = version$1;
|
|
15
15
|
function pull(originalInput, originalToBeRemoved, originalOpts) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name array-pull-all-with-glob
|
|
3
3
|
* @fileoverview Like _.pullAll but with globs (wildcards)
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.4
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/array-pull-all-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).arrayPullAllWithGlob={})}(this,(function(e){"use strict";const t=new Map,r=(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}))},n=(e,r)=>{r={caseSensitive:!1,...r};const n=e+JSON.stringify(r);if(t.has(n))return t.get(n);const o="!"===e[0];o&&(e=e.slice(1)),e=function(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}$`,r.caseSensitive?"":"i");return i.negated=o,t.set(n,i),i};function o(e,t,o){return((e,t,o,i)=>{if(e=r(e,"inputs"),0===(t=r(t,"patterns")).length)return[];t=t.map((e=>n(e,o)));const{allPatterns:s}=o||{},f=[];for(const r of e){let e;const n=[...t].fill(!1);for(const[o,i]of t.entries())if(i.test(r)&&(n[o]=!0,e=!i.negated,!e))break;if(!(!1===e||void 0===e&&t.some((e=>!e.negated))||s&&n.some(((e,r)=>!e&&!t[r].negated)))&&(f.push(r),i))break}return f})(e,t,o,!0).length>0}e.pull=function(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);const n="string"==typeof t?[t]:Array.from(t),i={caseSensitive:!0,...r};return Array.from(e).filter((e=>!n.some((t=>o(e,t,{caseSensitive:i.caseSensitive})))))},e.version="6.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).arrayPullAllWithGlob={})}(this,(function(e){"use strict";const t=new Map,r=(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}))},n=(e,r)=>{r={caseSensitive:!1,...r};const n=e+JSON.stringify(r);if(t.has(n))return t.get(n);const o="!"===e[0];o&&(e=e.slice(1)),e=function(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}$`,r.caseSensitive?"":"i");return i.negated=o,t.set(n,i),i};function o(e,t,o){return((e,t,o,i)=>{if(e=r(e,"inputs"),0===(t=r(t,"patterns")).length)return[];t=t.map((e=>n(e,o)));const{allPatterns:s}=o||{},f=[];for(const r of e){let e;const n=[...t].fill(!1);for(const[o,i]of t.entries())if(i.test(r)&&(n[o]=!0,e=!i.negated,!e))break;if(!(!1===e||void 0===e&&t.some((e=>!e.negated))||s&&n.some(((e,r)=>!e&&!t[r].negated)))&&(f.push(r),i))break}return f})(e,t,o,!0).length>0}e.pull=function(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);const n="string"==typeof t?[t]:Array.from(t),i={caseSensitive:!0,...r};return Array.from(e).filter((e=>!n.some((t=>o(e,t,{caseSensitive:i.caseSensitive})))))},e.version="6.0.4",Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "array-pull-all-with-glob",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"description": "Like _.pullAll but with globs (wildcards)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
110
110
|
"@types/node": "^16.11.6",
|
|
111
111
|
"@types/tap": "^15.0.5",
|
|
112
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
113
|
-
"@typescript-eslint/parser": "^5.
|
|
114
|
-
"core-js": "^3.19.
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
|
113
|
+
"@typescript-eslint/parser": "^5.3.0",
|
|
114
|
+
"core-js": "^3.19.1",
|
|
115
115
|
"cross-env": "^7.0.3",
|
|
116
116
|
"eslint": "^8.1.0",
|
|
117
|
-
"lect": "^0.18.
|
|
117
|
+
"lect": "^0.18.4",
|
|
118
118
|
"rollup": "^2.59.0",
|
|
119
119
|
"rollup-plugin-ascii": "^0.0.3",
|
|
120
120
|
"rollup-plugin-banner": "^0.2.1",
|