array-includes-with-glob 5.0.24 → 5.1.0

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/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/arrayVsArrayAllMustBeFound.js":"2","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/perf/check.js":"3","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/rollup.config.js":"4","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/src/main.ts":"5","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/test/test.js":"6"},{"size":386,"mtime":1760280945870,"results":"7","hashOfConfig":"8"},{"size":738,"mtime":1760280945870,"results":"9","hashOfConfig":"8"},{"size":414,"mtime":1760280945870,"results":"10","hashOfConfig":"11"},{"size":373,"mtime":1760280945871,"results":"12","hashOfConfig":"8"},{"size":1417,"mtime":1760280945871,"results":"13","hashOfConfig":"11"},{"size":4606,"mtime":1760280945871,"results":"14","hashOfConfig":"15"},{"filePath":"16","messages":"17","suppressedMessages":"18","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1f1u168",{"filePath":"19","messages":"20","suppressedMessages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","suppressedMessages":"24","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"91l1rm",{"filePath":"25","messages":"26","suppressedMessages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","suppressedMessages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","suppressedMessages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ns3qdb","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/arrayVsArrayAllMustBeFound.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/test/test.js",[],["34","35","36","37","38"],{"ruleId":"39","severity":2,"message":"40","line":3,"column":17,"nodeType":null,"messageId":"41","endLine":3,"endColumn":19,"suppressions":"42"},{"ruleId":"39","severity":2,"message":"43","line":3,"column":21,"nodeType":null,"messageId":"41","endLine":3,"endColumn":23,"suppressions":"44"},{"ruleId":"39","severity":2,"message":"45","line":3,"column":25,"nodeType":null,"messageId":"41","endLine":3,"endColumn":31,"suppressions":"46"},{"ruleId":"39","severity":2,"message":"47","line":3,"column":33,"nodeType":null,"messageId":"41","endLine":3,"endColumn":37,"suppressions":"48"},{"ruleId":"39","severity":2,"message":"49","line":3,"column":44,"nodeType":null,"messageId":"41","endLine":3,"endColumn":49,"suppressions":"50"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["51"],"'ok' is defined but never used.",["52"],"'throws' is defined but never used.",["53"],"'type' is defined but never used.",["54"],"'match' is defined but never used.",["55"],{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},"directive",""]
1
+ [{"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/arrayVsArrayAllMustBeFound.js":"2","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/perf/check.js":"3","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/rollup.config.js":"4","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/src/main.ts":"5","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/test/test.js":"6"},{"size":386,"mtime":1760566739063,"results":"7","hashOfConfig":"8"},{"size":738,"mtime":1760566739063,"results":"9","hashOfConfig":"8"},{"size":414,"mtime":1760566739063,"results":"10","hashOfConfig":"11"},{"size":373,"mtime":1760566739063,"results":"12","hashOfConfig":"8"},{"size":1417,"mtime":1760566739063,"results":"13","hashOfConfig":"11"},{"size":4606,"mtime":1760566739063,"results":"14","hashOfConfig":"15"},{"filePath":"16","messages":"17","suppressedMessages":"18","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"19","messages":"20","suppressedMessages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","suppressedMessages":"24","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"25","messages":"26","suppressedMessages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","suppressedMessages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","suppressedMessages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/examples/arrayVsArrayAllMustBeFound.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/array-includes-with-glob/test/test.js",[],["34","35","36","37","38"],{"ruleId":"39","severity":2,"message":"40","line":3,"column":17,"nodeType":null,"messageId":"41","endLine":3,"endColumn":19,"suppressions":"42"},{"ruleId":"39","severity":2,"message":"43","line":3,"column":21,"nodeType":null,"messageId":"41","endLine":3,"endColumn":23,"suppressions":"44"},{"ruleId":"39","severity":2,"message":"45","line":3,"column":25,"nodeType":null,"messageId":"41","endLine":3,"endColumn":31,"suppressions":"46"},{"ruleId":"39","severity":2,"message":"47","line":3,"column":33,"nodeType":null,"messageId":"41","endLine":3,"endColumn":37,"suppressions":"48"},{"ruleId":"39","severity":2,"message":"49","line":3,"column":44,"nodeType":null,"messageId":"41","endLine":3,"endColumn":49,"suppressions":"50"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["51"],"'ok' is defined but never used.",["52"],"'throws' is defined but never used.",["53"],"'type' is defined but never used.",["54"],"'match' is defined but never used.",["55"],{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},{"kind":"56","justification":"57"},"directive",""]
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 5.1.0 (2025-10-15)
7
+
8
+ ### Features
9
+
10
+ - if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
11
+
6
12
  ## 5.0.0 (2022-12-01)
7
13
 
8
14
  ### BREAKING CHANGES
@@ -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.24
4
+ * @version 5.1.0
5
5
  * @author Roy Revelt
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.24";var y=l,p={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function g(s,e,c){if(!s.length||!e.length)return!1;let r={...p,...c},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.1.0";var y=l,p={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function g(s,e,c){if(!s.length||!e.length)return!1;let r={...p,...c},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.24
4
+ * @version 5.1.0
5
5
  * @author Roy Revelt
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 b=Object.freeze,p=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var v=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&v(e,r,t[r]);if(x)for(var r of x(t))C.call(t,r)&&v(e,r,t[r]);return e};var M=(e,t)=>{for(var r in t)p(e,r,{get:t[r],enumerable:!0})},B=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $(t))!A.call(e,s)&&s!==r&&p(e,s,{get:()=>t[s],enumerable:!(i=R(t,s))||i.enumerable});return e};var D=e=>B(p({},"__esModule",{value:!0}),e);var f=(e,t)=>b(p(e,"raw",{value:b(t||e.slice())}));var H={};M(H,{defaults:()=>j,includesWithGlob:()=>O,version:()=>L});function m(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var h=new Map,S=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":{e=[e];break}case"undefined":{e=[];break}default:throw new TypeError("Expected '".concat(t,"' to be a string or an array, but got a type of '").concat(typeof e,"'"))}return e.filter(r=>{if(typeof r!="string"){if(r===void 0)return!1;throw new TypeError("Expected '".concat(t,"' to be an array of strings, but found a type of '").concat(typeof r,"' in the array"))}return!0})},w,_,E,V=(e,t)=>{t=u({caseSensitive:!1},t);let r="s"+(t.caseSensitive?"":"i"),i=e+"|"+r;if(h.has(i))return h.get(i);let s=e[0]==="!";s&&(e=e.slice(1)),e=e.replaceAll(String.raw(w||(w=f(["*"],["\\*"]))),"__ESCAPED_STAR__").replaceAll("\\\\","__ESCAPED_BACKSLASH__").replaceAll(/\\(.)/g,"$1"),e=m(e).replaceAll(String.raw(_||(_=f(["*"],["\\*"]))),".*"),e=e.replaceAll("__ESCAPED_STAR__",String.raw(E||(E=f(["*"],["\\*"])))).replaceAll("__ESCAPED_BACKSLASH__","\\\\");let n=new RegExp("^".concat(e,"$"),r);return n.negated=s,h.set(i,n),n},F=(e,t,r,i)=>{if(e=S(e,"inputs"),t=S(t,"patterns"),t.length===0)return[];t=t.map(o=>V(o,r));let s=t.filter(o=>o.negated),n=t.filter(o=>!o.negated),{allPatterns:l}=r||{},c=[];if(l&&i&&s.length>1&&n.length===0){for(let o of e)for(let d of s)if(d.test(o))return[];return e.slice(0,1)}for(let o of e){let d=!1;for(let a of s)if(a.test(o)){d=!0;break}if(!d){if(n.length===0)c.push(o);else if(l){let a=Array.from({length:n.length},()=>!1);for(let[y,P]of n.entries())P.test(o)&&(a[y]=!0);a.every(Boolean)&&c.push(o)}else{let a=!1;for(let y of n)if(y.test(o)){a=!0;break}a&&c.push(o)}if(i&&c.length>0)break}}return c};function g(e,t,r){return F(e,t,r,!0).length>0}var k="5.0.24";var L=k,j={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function O(e,t,r){if(!e.length||!t.length)return!1;let i=u(u({},j),r),s=typeof e=="string"?[e]:Array.from(e);return typeof t=="string"?s.some(n=>g(n,t,{caseSensitive:i.caseSensitive})):i.arrayVsArrayAllMustBeFound==="any"?t.some(n=>s.some(l=>g(l,n,{caseSensitive:i.caseSensitive}))):t.every(n=>s.some(l=>g(l,n,{caseSensitive:i.caseSensitive})))}return D(H);})();
10
+ "use strict";var arrayIncludesWithGlob=(()=>{var b=Object.freeze,p=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var v=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&v(e,r,t[r]);if(x)for(var r of x(t))C.call(t,r)&&v(e,r,t[r]);return e};var M=(e,t)=>{for(var r in t)p(e,r,{get:t[r],enumerable:!0})},B=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $(t))!A.call(e,s)&&s!==r&&p(e,s,{get:()=>t[s],enumerable:!(i=R(t,s))||i.enumerable});return e};var D=e=>B(p({},"__esModule",{value:!0}),e);var f=(e,t)=>b(p(e,"raw",{value:b(t||e.slice())}));var H={};M(H,{defaults:()=>j,includesWithGlob:()=>O,version:()=>L});function m(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var h=new Map,S=(e,t)=>{if(!Array.isArray(e))switch(typeof e){case"string":{e=[e];break}case"undefined":{e=[];break}default:throw new TypeError("Expected '".concat(t,"' to be a string or an array, but got a type of '").concat(typeof e,"'"))}return e.filter(r=>{if(typeof r!="string"){if(r===void 0)return!1;throw new TypeError("Expected '".concat(t,"' to be an array of strings, but found a type of '").concat(typeof r,"' in the array"))}return!0})},w,_,E,V=(e,t)=>{t=u({caseSensitive:!1},t);let r="s"+(t.caseSensitive?"":"i"),i=e+"|"+r;if(h.has(i))return h.get(i);let s=e[0]==="!";s&&(e=e.slice(1)),e=e.replaceAll(String.raw(w||(w=f(["*"],["\\*"]))),"__ESCAPED_STAR__").replaceAll("\\\\","__ESCAPED_BACKSLASH__").replaceAll(/\\(.)/g,"$1"),e=m(e).replaceAll(String.raw(_||(_=f(["*"],["\\*"]))),".*"),e=e.replaceAll("__ESCAPED_STAR__",String.raw(E||(E=f(["*"],["\\*"])))).replaceAll("__ESCAPED_BACKSLASH__","\\\\");let n=new RegExp("^".concat(e,"$"),r);return n.negated=s,h.set(i,n),n},F=(e,t,r,i)=>{if(e=S(e,"inputs"),t=S(t,"patterns"),t.length===0)return[];t=t.map(o=>V(o,r));let s=t.filter(o=>o.negated),n=t.filter(o=>!o.negated),{allPatterns:l}=r||{},c=[];if(l&&i&&s.length>1&&n.length===0){for(let o of e)for(let d of s)if(d.test(o))return[];return e.slice(0,1)}for(let o of e){let d=!1;for(let a of s)if(a.test(o)){d=!0;break}if(!d){if(n.length===0)c.push(o);else if(l){let a=Array.from({length:n.length},()=>!1);for(let[y,P]of n.entries())P.test(o)&&(a[y]=!0);a.every(Boolean)&&c.push(o)}else{let a=!1;for(let y of n)if(y.test(o)){a=!0;break}a&&c.push(o)}if(i&&c.length>0)break}}return c};function g(e,t,r){return F(e,t,r,!0).length>0}var k="5.1.0";var L=k,j={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function O(e,t,r){if(!e.length||!t.length)return!1;let i=u(u({},j),r),s=typeof e=="string"?[e]:Array.from(e);return typeof t=="string"?s.some(n=>g(n,t,{caseSensitive:i.caseSensitive})):i.arrayVsArrayAllMustBeFound==="any"?t.some(n=>s.some(l=>g(l,n,{caseSensitive:i.caseSensitive}))):t.every(n=>s.some(l=>g(l,n,{caseSensitive:i.caseSensitive})))}return D(H);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "array-includes-with-glob",
3
- "version": "5.0.24",
3
+ "version": "5.1.0",
4
4
  "description": "Like _.includes but with wildcards",
5
5
  "keywords": [
6
6
  "array",