@atlaspack/utils 2.14.10 → 2.15.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/CHANGELOG.md +18 -0
- package/benchmark.js +23 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +4 -2
- package/src/collection.js +10 -0
- package/src/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@atlaspack/codeframe": "2.13.3",
|
|
34
34
|
"@atlaspack/diagnostic": "2.14.1",
|
|
35
|
-
"@atlaspack/feature-flags": "2.
|
|
35
|
+
"@atlaspack/feature-flags": "2.18.0",
|
|
36
36
|
"@atlaspack/logger": "2.14.10",
|
|
37
37
|
"@atlaspack/markdown-ansi": "2.14.1",
|
|
38
38
|
"@atlaspack/rust": "3.3.5",
|
|
@@ -41,8 +41,10 @@
|
|
|
41
41
|
"nullthrows": "^1.1.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@atlaspack/babel-register": "2.14.1",
|
|
44
45
|
"@iarna/toml": "^2.2.0",
|
|
45
46
|
"ansi-html-community": "0.0.8",
|
|
47
|
+
"benny": "^3.7.1",
|
|
46
48
|
"clone": "^2.1.1",
|
|
47
49
|
"fast-glob": "^3.2.12",
|
|
48
50
|
"fastest-levenshtein": "^1.0.16",
|
package/src/collection.js
CHANGED
|
@@ -94,6 +94,16 @@ export function setIntersect<T>(a: Set<T>, b: $ReadOnlySet<T>): void {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
export function setIntersectStatic<T>(a: Set<T>, b: Set<T>): Set<T> {
|
|
98
|
+
let intersection = new Set();
|
|
99
|
+
for (let entry of a) {
|
|
100
|
+
if (b.has(entry)) {
|
|
101
|
+
intersection.add(entry);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return intersection;
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
export function setUnion<T>(a: Iterable<T>, b: Iterable<T>): Set<T> {
|
|
98
108
|
return new Set([...a, ...b]);
|
|
99
109
|
}
|