array-pull-all-with-glob 6.2.3 → 6.2.5
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 +3 -3
- package/README.md +13 -16
- package/dist/array-pull-all-with-glob.esm.js +2 -2
- package/dist/array-pull-all-with-glob.umd.js +2 -2
- package/package.json +2 -2
- package/examples/_quickTake.js +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -23,7 +23,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
23
23
|
|
|
24
24
|
### BREAKING CHANGES
|
|
25
25
|
|
|
26
|
-
- programs now are in ES Modules and won't work with Common JS require()
|
|
26
|
+
- programs now are in ES Modules and won't work with Common JS `require()`
|
|
27
27
|
|
|
28
28
|
## 5.1.0 (2021-05-24)
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
41
41
|
|
|
42
42
|
### Fixed
|
|
43
43
|
|
|
44
|
-
- add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
|
|
44
|
+
- add `testStats` to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
|
|
45
45
|
|
|
46
46
|
## 5.0.0 (2021-01-23)
|
|
47
47
|
|
|
@@ -55,7 +55,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
55
55
|
|
|
56
56
|
## 4.13.0 (2020-11-28)
|
|
57
57
|
|
|
58
|
-
Accidental version bump during migration to
|
|
58
|
+
Accidental version bump during migration to SourceHut. Sorry about that.
|
|
59
59
|
|
|
60
60
|
## 4.12.0 (2019-01-20)
|
|
61
61
|
|
package/README.md
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">array-pull-all-with-glob</h1>
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<p align="center">Like _.pullAll but with globs (wildcards)</p>
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
<a href="https://www.npmjs.com/package/array-pull-all-with-glob" rel="nofollow noreferrer noopener">
|
|
7
|
-
<img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
|
|
8
|
-
</a>
|
|
5
|
+
<p align="center">
|
|
9
6
|
<a href="https://codsen.com/os/array-pull-all-with-glob" rel="nofollow noreferrer noopener">
|
|
10
7
|
<img src="https://img.shields.io/badge/-codsen-blue?style=flat-square" alt="page on codsen.com">
|
|
11
8
|
</a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/array-pull-all-with-glob" rel="nofollow noreferrer noopener">
|
|
10
|
+
<img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
|
|
11
|
+
</a>
|
|
12
12
|
<a href="https://github.com/codsen/codsen/tree/main/packages/array-pull-all-with-glob" rel="nofollow noreferrer noopener">
|
|
13
13
|
<img src="https://img.shields.io/badge/-github-blue?style=flat-square" alt="page on github">
|
|
14
14
|
</a>
|
|
15
15
|
<a href="https://npmcharts.com/compare/array-pull-all-with-glob?interval=30" rel="nofollow noreferrer noopener" target="_blank">
|
|
16
16
|
<img src="https://img.shields.io/npm/dm/array-pull-all-with-glob.svg?style=flat-square" alt="Downloads per month">
|
|
17
17
|
</a>
|
|
18
|
-
<a href="https://
|
|
19
|
-
<img src="https://img.shields.io/badge/
|
|
20
|
-
</a>
|
|
21
|
-
<img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT License">
|
|
22
|
-
<a href="https://liberamanifesto.com" rel="nofollow noreferrer noopener" target="_blank">
|
|
23
|
-
<img src="https://img.shields.io/badge/libera-manifesto-lightgrey.svg?style=flat-square" alt="libera manifesto">
|
|
18
|
+
<a href="https://codsen.com/os/array-pull-all-with-glob/changelog" rel="nofollow noreferrer noopener">
|
|
19
|
+
<img src="https://img.shields.io/badge/changelog-here-brightgreen?style=flat-square" alt="changelog">
|
|
24
20
|
</a>
|
|
25
|
-
|
|
21
|
+
<img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT Licence">
|
|
22
|
+
</p>
|
|
26
23
|
|
|
27
24
|
## Install
|
|
28
25
|
|
|
@@ -58,8 +55,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
58
55
|
|
|
59
56
|
## Licence
|
|
60
57
|
|
|
61
|
-
MIT License
|
|
58
|
+
MIT License.
|
|
62
59
|
|
|
63
|
-
Copyright
|
|
60
|
+
Copyright © 2010-2022 Roy Revelt and other contributors.
|
|
64
61
|
|
|
65
|
-
<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">
|
|
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 6.2.
|
|
4
|
+
* @version 6.2.5
|
|
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 p}from"matcher";var r="6.2.
|
|
10
|
+
import{isMatch as p}from"matcher";var r="6.2.5";var g=r,u={caseSensitive:!0};function h(e,t,s){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);let l=typeof t=="string"?[t]:Array.from(t),n={...u,...s};return Array.from(e).filter(i=>!l.some(a=>p(i,a,{caseSensitive:n.caseSensitive})))}export{u as defaults,h as pull,g 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 6.2.
|
|
4
|
+
* @version 6.2.5
|
|
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 k=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var h=(e,r
|
|
10
|
+
"use strict";var arrayPullAllWithGlob=(()=>{var p=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var h=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&h(e,r,t[r]);if(g)for(var r of g(t))S.call(t,r)&&h(e,r,t[r]);return e};var j=(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 E(t))!m.call(e,s)&&s!==r&&p(e,s,{get:()=>t[s],enumerable:!(n=k(t,s))||n.enumerable});return e};var M=e=>$(p({},"__esModule",{value:!0}),e);var P={};j(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=o({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,y=[...t].fill(!1);for(let[a,c]of t.entries())if(c.test(l)&&(y[a]=!0,i=!c.negated,!i))break;if(!(i===!1||i===void 0&&t.some(a=>!a.negated)||s&&y.some((a,c)=>!a&&!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="6.2.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=o(o({},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": "6.2.
|
|
3
|
+
"version": "6.2.5",
|
|
4
4
|
"description": "Like _.pullAll but with globs (wildcards)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
47
47
|
"lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
|
|
48
48
|
"letspublish": "yarn publish || :",
|
|
49
|
-
"lint": "eslint . --fix",
|
|
49
|
+
"lint": "eslint . --ext .js --ext .ts --fix",
|
|
50
50
|
"perf": "node perf/check.js",
|
|
51
51
|
"prepare": "echo 'ready'",
|
|
52
52
|
"prettier": "prettier",
|
package/examples/_quickTake.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Quick Take
|
|
2
|
-
|
|
3
|
-
import { strict as assert } from "assert";
|
|
4
|
-
|
|
5
|
-
import { pull } from "../dist/array-pull-all-with-glob.esm.js";
|
|
6
|
-
|
|
7
|
-
assert.deepEqual(
|
|
8
|
-
pull(
|
|
9
|
-
["keep_me", "name-1", "name-2", "name-jhkgdhgkhdfghdkghfdk"],
|
|
10
|
-
["name-*"]
|
|
11
|
-
),
|
|
12
|
-
["keep_me"]
|
|
13
|
-
);
|