array-includes-with-glob 5.0.8 → 5.0.10

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-2023 Roy Revelt and other contributors
3
+ Copyright (c) 2010-2024 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
@@ -58,6 +58,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
58
58
 
59
59
  MIT License.
60
60
 
61
- Copyright © 2010-2023 Roy Revelt and other contributors.
61
+ Copyright © 2010-2024 Roy Revelt and other contributors.
62
62
 
63
63
  <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-includes-with-glob
3
3
  * @fileoverview Like _.includes but with wildcards
4
- * @version 5.0.8
4
+ * @version 5.0.10
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
- import{isMatch as o}from"matcher";var l="5.0.8";var y=l,p={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function g(s,e,a){if(!s.length||!e.length)return!1;let r={...p,...a},n=typeof s=="string"?[s]:Array.from(s);return typeof e=="string"?n.some(t=>o(t,e,{caseSensitive:r.caseSensitive})):r.arrayVsArrayAllMustBeFound==="any"?e.some(t=>n.some(i=>o(i,t,{caseSensitive:r.caseSensitive}))):e.every(t=>n.some(i=>o(i,t,{caseSensitive:r.caseSensitive})))}export{p as defaults,g as includesWithGlob,y as version};
10
+ import{isMatch as o}from"matcher";var l="5.0.10";var y=l,p={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function g(s,e,a){if(!s.length||!e.length)return!1;let r={...p,...a},n=typeof s=="string"?[s]:Array.from(s);return typeof e=="string"?n.some(t=>o(t,e,{caseSensitive:r.caseSensitive})):r.arrayVsArrayAllMustBeFound==="any"?e.some(t=>n.some(i=>o(i,t,{caseSensitive:r.caseSensitive}))):e.every(t=>n.some(i=>o(i,t,{caseSensitive:r.caseSensitive})))}export{p as defaults,g as includesWithGlob,y as version};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name array-includes-with-glob
3
3
  * @fileoverview Like _.includes but with wildcards
4
- * @version 5.0.8
4
+ * @version 5.0.10
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
- "use strict";var arrayIncludesWithGlob=(()=>{var u=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var h=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>{for(var r in e||(e={}))x.call(e,r)&&h(t,r,e[r]);if(m)for(var r of m(e))k.call(e,r)&&h(t,r,e[r]);return t};var A=(t,e)=>{for(var r in e)u(t,r,{get:e[r],enumerable:!0})},E=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!x.call(t,s)&&s!==r&&u(t,s,{get:()=>e[s],enumerable:!(n=S(e,s))||n.enumerable});return t};var M=t=>E(u({},"__esModule",{value:!0}),t);var B={};A(B,{defaults:()=>w,includesWithGlob:()=>V,version:()=>F});function f(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var y=new Map,b=(t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},$=(t,e)=>{e=c({caseSensitive:!1},e);let r=t+JSON.stringify(e);if(y.has(r))return y.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=f(t).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return s.negated=n,y.set(r,s),s},R=(t,e,r,n)=>{if(t=b(t,"inputs"),e=b(e,"patterns"),e.length===0)return[];e=e.map(o=>$(o,r));let{allPatterns:s}=r||{},i=[];for(let o of t){let l,g=[...e].fill(!1);for(let[a,d]of e.entries())if(d.test(o)&&(g[a]=!0,l=!d.negated,!l))break;if(!(l===!1||l===void 0&&e.some(a=>!a.negated)||s&&g.some((a,d)=>!a&&!e[d].negated))&&(i.push(o),n))break}return i};function p(t,e,r){return R(t,e,r,!0).length>0}var v="5.0.8";var F=v,w={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function V(t,e,r){if(!t.length||!e.length)return!1;let n=c(c({},w),r),s=typeof t=="string"?[t]:Array.from(t);return typeof e=="string"?s.some(i=>p(i,e,{caseSensitive:n.caseSensitive})):n.arrayVsArrayAllMustBeFound==="any"?e.some(i=>s.some(o=>p(o,i,{caseSensitive:n.caseSensitive}))):e.every(i=>s.some(o=>p(o,i,{caseSensitive:n.caseSensitive})))}return M(B);})();
10
+ "use strict";var arrayIncludesWithGlob=(()=>{var u=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var h=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>{for(var r in e||(e={}))x.call(e,r)&&h(t,r,e[r]);if(m)for(var r of m(e))k.call(e,r)&&h(t,r,e[r]);return t};var A=(t,e)=>{for(var r in e)u(t,r,{get:e[r],enumerable:!0})},E=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!x.call(t,s)&&s!==r&&u(t,s,{get:()=>e[s],enumerable:!(n=S(e,s))||n.enumerable});return t};var M=t=>E(u({},"__esModule",{value:!0}),t);var B={};A(B,{defaults:()=>w,includesWithGlob:()=>V,version:()=>F});function f(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var y=new Map,b=(t,e)=>{if(!Array.isArray(t))switch(typeof t){case"string":t=[t];break;case"undefined":t=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof t}'`)}return t.filter(r=>{if(typeof r!="string"){if(typeof r>"u")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof r}' in the array`)}return!0})},$=(t,e)=>{e=c({caseSensitive:!1},e);let r=t+JSON.stringify(e);if(y.has(r))return y.get(r);let n=t[0]==="!";n&&(t=t.slice(1)),t=f(t).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${t}$`,e.caseSensitive?"":"i");return s.negated=n,y.set(r,s),s},R=(t,e,r,n)=>{if(t=b(t,"inputs"),e=b(e,"patterns"),e.length===0)return[];e=e.map(o=>$(o,r));let{allPatterns:s}=r||{},i=[];for(let o of t){let l,g=[...e].fill(!1);for(let[a,d]of e.entries())if(d.test(o)&&(g[a]=!0,l=!d.negated,!l))break;if(!(l===!1||l===void 0&&e.some(a=>!a.negated)||s&&g.some((a,d)=>!a&&!e[d].negated))&&(i.push(o),n))break}return i};function p(t,e,r){return R(t,e,r,!0).length>0}var v="5.0.10";var F=v,w={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function V(t,e,r){if(!t.length||!e.length)return!1;let n=c(c({},w),r),s=typeof t=="string"?[t]:Array.from(t);return typeof e=="string"?s.some(i=>p(i,e,{caseSensitive:n.caseSensitive})):n.arrayVsArrayAllMustBeFound==="any"?e.some(i=>s.some(o=>p(o,i,{caseSensitive:n.caseSensitive}))):e.every(i=>s.some(o=>p(o,i,{caseSensitive:n.caseSensitive})))}return M(B);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "array-includes-with-glob",
3
- "version": "5.0.8",
3
+ "version": "5.0.10",
4
4
  "description": "Like _.includes but with wildcards",
5
5
  "keywords": [
6
6
  "array",
package/types/index.d.ts CHANGED
@@ -13,4 +13,4 @@ declare function includesWithGlob(
13
13
  opts?: Partial<Opts>,
14
14
  ): boolean;
15
15
 
16
- export { Opts, defaults, includesWithGlob, version };
16
+ export { type Opts, defaults, includesWithGlob, version };