array-pull-all-with-glob 7.0.5 → 7.0.7

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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2022 Roy Revelt and other contributors
3
+ Copyright (c) 2010-2023 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -57,6 +57,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
57
57
 
58
58
  MIT License.
59
59
 
60
- Copyright © 2010-2022 Roy Revelt and other contributors.
60
+ Copyright © 2010-2023 Roy Revelt and other contributors.
61
61
 
62
62
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -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 7.0.5
4
+ * @version 7.0.7
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
- import{isMatch as a}from"matcher";var s="7.0.5";var h=s,u={caseSensitive:!0};function y(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);let l=typeof t=="string"?[t]:Array.from(t),n={...u,...r};return Array.from(e).filter(i=>!l.some(p=>a(i,p,{caseSensitive:n.caseSensitive})))}export{u as defaults,y as pull,h as version};
10
+ import{isMatch as a}from"matcher";var s="7.0.7";var h=s,u={caseSensitive:!0};function y(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);let l=typeof t=="string"?[t]:Array.from(t),n={...u,...r};return Array.from(e).filter(i=>!l.some(p=>a(i,p,{caseSensitive:n.caseSensitive})))}export{u as defaults,y as pull,h as version};
@@ -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 7.0.5
4
+ * @version 7.0.7
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
- "use strict";var arrayPullAllWithGlob=(()=>{var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var y=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&y(e,r,t[r]);if(m)for(var r of m(t))E.call(t,r)&&y(e,r,t[r]);return e};var S=(e,t)=>{for(var r in t)p(e,r,{get:t[r],enumerable:!0})},$=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of k(t))!h.call(e,s)&&s!==r&&p(e,s,{get:()=>t[s],enumerable:!(n=j(t,s))||n.enumerable});return e};var M=e=>$(p({},"__esModule",{value:!0}),e);var P={};S(P,{defaults:()=>v,pull:()=>D,version:()=>T});function d(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var f=new Map,x=(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(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},O=(e,t)=>{t=a({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(f.has(r))return f.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=d(e).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return s.negated=n,f.set(r,s),s},A=(e,t,r,n)=>{if(e=x(e,"inputs"),t=x(t,"patterns"),t.length===0)return[];t=t.map(l=>O(l,r));let{allPatterns:s}=r||{},u=[];for(let l of e){let i,g=[...t].fill(!1);for(let[o,c]of t.entries())if(c.test(l)&&(g[o]=!0,i=!c.negated,!i))break;if(!(i===!1||i===void 0&&t.some(o=>!o.negated)||s&&g.some((o,c)=>!o&&!t[c].negated))&&(u.push(l),n))break}return u};function b(e,t,r){return A(e,t,r,!0).length>0}var w="7.0.5";var T=w,v={caseSensitive:!0};function D(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);let n=typeof t=="string"?[t]:Array.from(t),s=a(a({},v),r);return Array.from(e).filter(l=>!n.some(i=>b(l,i,{caseSensitive:s.caseSensitive})))}return M(P);})();
10
+ "use strict";var arrayPullAllWithGlob=(()=>{var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var y=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&y(e,r,t[r]);if(m)for(var r of m(t))E.call(t,r)&&y(e,r,t[r]);return e};var S=(e,t)=>{for(var r in t)p(e,r,{get:t[r],enumerable:!0})},$=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of k(t))!h.call(e,s)&&s!==r&&p(e,s,{get:()=>t[s],enumerable:!(n=j(t,s))||n.enumerable});return e};var M=e=>$(p({},"__esModule",{value:!0}),e);var P={};S(P,{defaults:()=>v,pull:()=>D,version:()=>T});function d(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var f=new Map,x=(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(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},O=(e,t)=>{t=a({caseSensitive:!1},t);let r=e+JSON.stringify(t);if(f.has(r))return f.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=d(e).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return s.negated=n,f.set(r,s),s},A=(e,t,r,n)=>{if(e=x(e,"inputs"),t=x(t,"patterns"),t.length===0)return[];t=t.map(l=>O(l,r));let{allPatterns:s}=r||{},u=[];for(let l of e){let i,g=[...t].fill(!1);for(let[o,c]of t.entries())if(c.test(l)&&(g[o]=!0,i=!c.negated,!i))break;if(!(i===!1||i===void 0&&t.some(o=>!o.negated)||s&&g.some((o,c)=>!o&&!t[c].negated))&&(u.push(l),n))break}return u};function b(e,t,r){return A(e,t,r,!0).length>0}var w="7.0.7";var T=w,v={caseSensitive:!0};function D(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);let n=typeof t=="string"?[t]:Array.from(t),s=a(a({},v),r);return Array.from(e).filter(l=>!n.some(i=>b(l,i,{caseSensitive:s.caseSensitive})))}return M(P);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "array-pull-all-with-glob",
3
- "version": "7.0.5",
3
+ "version": "7.0.7",
4
4
  "description": "Like _.pullAll but with globs (wildcards)",
5
5
  "keywords": [
6
6
  "array",