array-includes-with-glob 4.1.1 → 4.1.3

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/CHANGELOG.md CHANGED
@@ -33,7 +33,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
33
33
 
34
34
  ## 3.0.1 (2021-01-28)
35
35
 
36
- ### Bug Fixes
36
+ ### Fixed
37
37
 
38
38
  - add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
39
39
 
@@ -59,8 +59,8 @@ Accidental version bump during migration to sourcehut. Sorry about that.
59
59
 
60
60
  ## 2.11.0 (2019-01-20)
61
61
 
62
- - Various documentation and setup tweaks after we migrated to monorepo
63
- - Setup refresh: updated dependencies and all config files using automated tools
62
+ - Various documentation and setup tweaks after we migrated to monorepo
63
+ - Setup refresh: updated dependencies and all config files using automated tools
64
64
 
65
65
  ## 2.5.0 (2018-12-14)
66
66
 
@@ -68,48 +68,48 @@ Accidental version bump during migration to sourcehut. Sorry about that.
68
68
 
69
69
  ## 2.4.0 (2018-10-12)
70
70
 
71
- - Updated all dependencies and restored coverage reporting both in terminal and sending to coveralls
71
+ - Updated all dependencies and restored coverage reporting both in terminal and sending to coveralls
72
72
 
73
73
  ## 2.3.0 (2018-05-11)
74
74
 
75
- - Pointed AVA unit tests to ES Modules build, as opposed to previously transpiled CommonJS-one. This means, now unit test code coverage is correct.
75
+ - Pointed AVA unit tests to ES Modules build, as opposed to previously transpiled CommonJS-one. This means, now unit test code coverage is correct.
76
76
 
77
77
  ## 2.2.0 (2018-04-29)
78
78
 
79
- - Set up Prettier
80
- - Removed `package.lock` and `.editorconfig`
81
- - Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove them during the builds.
79
+ - Set up Prettier
80
+ - Removed `package.lock` and `.editorconfig`
81
+ - Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove them during the builds.
82
82
 
83
83
  ## 2.1.0 (2018-02-11)
84
84
 
85
- - Up until now the [matcher.js](https://github.com/sindresorhus/matcher) which was driving the wildcard matching was not-case sensitive. Today they released case-sensitive option and we are setting it on. This will ensure the consistency in matching results.
85
+ - Up until now the [matcher.js](https://github.com/sindresorhus/matcher) which was driving the wildcard matching was not-case sensitive. Today they released case-sensitive option and we are setting it on. This will ensure the consistency in matching results.
86
86
 
87
87
  ## 2.0.0 (2017-12-08)
88
88
 
89
- - Removed JS Standard and switched to raw ESLint with `airbnb-base` config. That's because ESLint is always up-to-date (unlike JS Standard which might consume half-year-old ESLint like it does now) and also because `airbnb-*` configs have more rules active. I overrode the setting for semicolons, of course.
89
+ - Removed JS Standard and switched to raw ESLint with `airbnb-base` config. That's because ESLint is always up-to-date (unlike JS Standard which might consume half-year-old ESLint like it does now) and also because `airbnb-*` configs have more rules active. I overrode the setting for semicolons, of course.
90
90
 
91
91
  Bumping major just in case it breaks somebody's API. But I don't think it will.
92
92
 
93
93
  ## 1.5.0 (2017-07-23)
94
94
 
95
- - Removed `object-assign` from deps, switched to native `Object.assign`
96
- - Set all dev deps except Standard to be latest (`*`) to save time updating them
95
+ - Removed `object-assign` from deps, switched to native `Object.assign`
96
+ - Set all dev deps except Standard to be latest (`*`) to save time updating them
97
97
  - Updated All deps
98
98
 
99
99
  ## 1.4.0 (2017-04-23) Sunday evening
100
100
 
101
- - There are some finshy things happening with string wildcard libraries. Namely, [wildcard](https://www.npmjs.com/package/wildcard) and [wildstring](https://www.npmjs.com/package/wildstring). I was using `wildstring` until I in another of my libraries discovered that it does not support leading wildcards, that is when asterisk is the first character! WTF!!! Same case with `wildcard` too. Proof's [here](https://runkit.com/58fd11151dc1c60013c79f85/58fd132d15bef7001293f41a) and there are other [issues](https://github.com/DamonOehlman/wildcard/issues/9) with its API as well!!!
101
+ - There are some finshy things happening with string wildcard libraries. Namely, [wildcard](https://www.npmjs.com/package/wildcard) and [wildstring](https://www.npmjs.com/package/wildstring). I was using `wildstring` until I in another of my libraries discovered that it does not support leading wildcards, that is when asterisk is the first character! WTF!!! Same case with `wildcard` too. Proof's [here](https://runkit.com/58fd11151dc1c60013c79f85/58fd132d15bef7001293f41a) and there are other [issues](https://github.com/DamonOehlman/wildcard/issues/9) with its API as well!!!
102
102
  SOLUTION: switched to Sindre Sorhus' [matcher](https://www.npmjs.com/package/matcher). Small amendments (order of arguments) and one find-and-replace on the method `isMatch`. Problem solved!
103
103
 
104
104
  ## 1.3.0 (2017-04-23)
105
105
 
106
- - You can provide an array (second argument) of strings to check, is ANY of them found in the source (first argument).
107
- - Alternatively, you can set the matching to request that ALL elements from second argument array must be found in the source array (first argument).
106
+ - You can provide an array (second argument) of strings to check, is ANY of them found in the source (first argument).
107
+ - Alternatively, you can set the matching to request that ALL elements from second argument array must be found in the source array (first argument).
108
108
 
109
109
  ## 1.2.0 (2017-04-22)
110
110
 
111
- - Now the input can be not only array, but string as well. It will be converted into an array first and then processed.
111
+ - Now the input can be not only array, but string as well. It will be converted into an array first and then processed.
112
112
 
113
113
  ## 1.0.0 (2017-04-22)
114
114
 
115
- - First public release
115
+ - First public release
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name array-includes-with-glob
3
3
  * @fileoverview Like _.includes but with wildcards
4
- * @version 4.1.1
4
+ * @version 4.1.3
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 u(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var y=new Map,f=(e,r)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${r}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(t=>{if(typeof t!="string"){if(typeof t>"u")return!1;throw new TypeError(`Expected '${r}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0})},h=(e,r)=>{r={caseSensitive:!1,...r};let t=e+JSON.stringify(r);if(y.has(t))return y.get(t);let s=e[0]==="!";s&&(e=e.slice(1)),e=u(e).replace(/\\\*/g,"[\\s\\S]*");let n=new RegExp(`^${e}$`,r.caseSensitive?"":"i");return n.negated=s,y.set(t,n),n},m=(e,r,t,s)=>{if(e=f(e,"inputs"),r=f(r,"patterns"),r.length===0)return[];r=r.map(a=>h(a,t));let{allPatterns:n}=t||{},i=[];for(let a of e){let c,p=[...r].fill(!1);for(let[o,l]of r.entries())if(l.test(a)&&(p[o]=!0,c=!l.negated,!c))break;if(!(c===!1||c===void 0&&r.some(o=>!o.negated)||n&&p.some((o,l)=>!o&&!r[l].negated))&&(i.push(a),s))break}return i};function d(e,r,t){return m(e,r,t,!0).length>0}var g="4.1.1";var M=g,x={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function j(e,r,t){if(!e.length||!r.length)return!1;let s={...x,...t},n=typeof e=="string"?[e]:Array.from(e);return typeof r=="string"?n.some(i=>d(i,r,{caseSensitive:s.caseSensitive})):s.arrayVsArrayAllMustBeFound==="any"?r.some(i=>n.some(a=>d(a,i,{caseSensitive:s.caseSensitive}))):r.every(i=>n.some(a=>d(a,i,{caseSensitive:s.caseSensitive})))}export{x as defaults,j as includesWithGlob,M as version};
10
+ function u(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var y=new Map,f=(e,r)=>{if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${r}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter(t=>{if(typeof t!="string"){if(typeof t>"u")return!1;throw new TypeError(`Expected '${r}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0})},h=(e,r)=>{r={caseSensitive:!1,...r};let t=e+JSON.stringify(r);if(y.has(t))return y.get(t);let s=e[0]==="!";s&&(e=e.slice(1)),e=u(e).replace(/\\\*/g,"[\\s\\S]*");let n=new RegExp(`^${e}$`,r.caseSensitive?"":"i");return n.negated=s,y.set(t,n),n},m=(e,r,t,s)=>{if(e=f(e,"inputs"),r=f(r,"patterns"),r.length===0)return[];r=r.map(a=>h(a,t));let{allPatterns:n}=t||{},i=[];for(let a of e){let c,p=[...r].fill(!1);for(let[o,l]of r.entries())if(l.test(a)&&(p[o]=!0,c=!l.negated,!c))break;if(!(c===!1||c===void 0&&r.some(o=>!o.negated)||n&&p.some((o,l)=>!o&&!r[l].negated))&&(i.push(a),s))break}return i};function d(e,r,t){return m(e,r,t,!0).length>0}var g="4.1.3";var M=g,x={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function j(e,r,t){if(!e.length||!r.length)return!1;let s={...x,...t},n=typeof e=="string"?[e]:Array.from(e);return typeof r=="string"?n.some(i=>d(i,r,{caseSensitive:s.caseSensitive})):s.arrayVsArrayAllMustBeFound==="any"?r.some(i=>n.some(a=>d(a,i,{caseSensitive:s.caseSensitive}))):r.every(i=>n.some(a=>d(a,i,{caseSensitive:s.caseSensitive})))}export{x as defaults,j as includesWithGlob,M 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 4.1.1
4
+ * @version 4.1.3
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 k=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var m=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,c=(r,e)=>{for(var t in e||(e={}))b.call(e,t)&&m(r,t,e[t]);if(h)for(var t of h(e))A.call(e,t)&&m(r,t,e[t]);return r};var E=(r,e)=>{for(var t in e)u(r,t,{get:e[t],enumerable:!0})},M=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of k(e))!b.call(r,s)&&s!==t&&u(r,s,{get:()=>e[s],enumerable:!(n=S(e,s))||n.enumerable});return r};var j=r=>M(u({},"__esModule",{value:!0}),r);var B={};E(B,{defaults:()=>w,includesWithGlob:()=>V,version:()=>F});function p(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var f=new Map,x=(r,e)=>{if(!Array.isArray(r))switch(typeof r){case"string":r=[r];break;case"undefined":r=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof r}'`)}return r.filter(t=>{if(typeof t!="string"){if(typeof t>"u")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0})},$=(r,e)=>{e=c({caseSensitive:!1},e);let t=r+JSON.stringify(e);if(f.has(t))return f.get(t);let n=r[0]==="!";n&&(r=r.slice(1)),r=p(r).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${r}$`,e.caseSensitive?"":"i");return s.negated=n,f.set(t,s),s},R=(r,e,t,n)=>{if(r=x(r,"inputs"),e=x(e,"patterns"),e.length===0)return[];e=e.map(a=>$(a,t));let{allPatterns:s}=t||{},i=[];for(let a of r){let l,g=[...e].fill(!1);for(let[o,d]of e.entries())if(d.test(a)&&(g[o]=!0,l=!d.negated,!l))break;if(!(l===!1||l===void 0&&e.some(o=>!o.negated)||s&&g.some((o,d)=>!o&&!e[d].negated))&&(i.push(a),n))break}return i};function y(r,e,t){return R(r,e,t,!0).length>0}var v="4.1.1";var F=v,w={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function V(r,e,t){if(!r.length||!e.length)return!1;let n=c(c({},w),t),s=typeof r=="string"?[r]:Array.from(r);return typeof e=="string"?s.some(i=>y(i,e,{caseSensitive:n.caseSensitive})):n.arrayVsArrayAllMustBeFound==="any"?e.some(i=>s.some(a=>y(a,i,{caseSensitive:n.caseSensitive}))):e.every(i=>s.some(a=>y(a,i,{caseSensitive:n.caseSensitive})))}return j(B);})();
10
+ "use strict";var arrayIncludesWithGlob=(()=>{var u=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var m=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,c=(r,e)=>{for(var t in e||(e={}))b.call(e,t)&&m(r,t,e[t]);if(h)for(var t of h(e))A.call(e,t)&&m(r,t,e[t]);return r};var E=(r,e)=>{for(var t in e)u(r,t,{get:e[t],enumerable:!0})},M=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of k(e))!b.call(r,s)&&s!==t&&u(r,s,{get:()=>e[s],enumerable:!(n=S(e,s))||n.enumerable});return r};var j=r=>M(u({},"__esModule",{value:!0}),r);var B={};E(B,{defaults:()=>w,includesWithGlob:()=>V,version:()=>F});function p(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var f=new Map,x=(r,e)=>{if(!Array.isArray(r))switch(typeof r){case"string":r=[r];break;case"undefined":r=[];break;default:throw new TypeError(`Expected '${e}' to be a string or an array, but got a type of '${typeof r}'`)}return r.filter(t=>{if(typeof t!="string"){if(typeof t>"u")return!1;throw new TypeError(`Expected '${e}' to be an array of strings, but found a type of '${typeof t}' in the array`)}return!0})},$=(r,e)=>{e=c({caseSensitive:!1},e);let t=r+JSON.stringify(e);if(f.has(t))return f.get(t);let n=r[0]==="!";n&&(r=r.slice(1)),r=p(r).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${r}$`,e.caseSensitive?"":"i");return s.negated=n,f.set(t,s),s},R=(r,e,t,n)=>{if(r=x(r,"inputs"),e=x(e,"patterns"),e.length===0)return[];e=e.map(a=>$(a,t));let{allPatterns:s}=t||{},i=[];for(let a of r){let l,g=[...e].fill(!1);for(let[o,d]of e.entries())if(d.test(a)&&(g[o]=!0,l=!d.negated,!l))break;if(!(l===!1||l===void 0&&e.some(o=>!o.negated)||s&&g.some((o,d)=>!o&&!e[d].negated))&&(i.push(a),n))break}return i};function y(r,e,t){return R(r,e,t,!0).length>0}var v="4.1.3";var F=v,w={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function V(r,e,t){if(!r.length||!e.length)return!1;let n=c(c({},w),t),s=typeof r=="string"?[r]:Array.from(r);return typeof e=="string"?s.some(i=>y(i,e,{caseSensitive:n.caseSensitive})):n.arrayVsArrayAllMustBeFound==="any"?e.some(i=>s.some(a=>y(a,i,{caseSensitive:n.caseSensitive}))):e.every(i=>s.some(a=>y(a,i,{caseSensitive:n.caseSensitive})))}return j(B);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "array-includes-with-glob",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "Like _.includes but with wildcards",
5
5
  "keywords": [
6
6
  "array",