@dxos/util 0.8.2-main.f11618f → 0.8.2-staging.7ac8446
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/dist/lib/browser/index.mjs +0 -23
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +0 -24
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +0 -23
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/array.d.ts +0 -8
- package/dist/types/src/array.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/array.ts +0 -34
|
@@ -60,28 +60,6 @@ var partition = (array, guard) => {
|
|
|
60
60
|
[]
|
|
61
61
|
]);
|
|
62
62
|
};
|
|
63
|
-
var intersectBy = (arrays, selector) => {
|
|
64
|
-
if (arrays.length === 0) {
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
if (arrays.length === 1) {
|
|
68
|
-
return [
|
|
69
|
-
...arrays[0]
|
|
70
|
-
];
|
|
71
|
-
}
|
|
72
|
-
const [first, ...rest] = arrays;
|
|
73
|
-
const lookups = rest.map((array) => {
|
|
74
|
-
const map = /* @__PURE__ */ new Map();
|
|
75
|
-
for (const item of array) {
|
|
76
|
-
map.set(selector(item), item);
|
|
77
|
-
}
|
|
78
|
-
return map;
|
|
79
|
-
});
|
|
80
|
-
return first.filter((item) => {
|
|
81
|
-
const key = selector(item);
|
|
82
|
-
return lookups.every((lookup) => lookup.has(key));
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
63
|
|
|
86
64
|
// packages/common/util/src/array-to-hex.ts
|
|
87
65
|
var byteToHex = [];
|
|
@@ -2140,7 +2118,6 @@ export {
|
|
|
2140
2118
|
idHue,
|
|
2141
2119
|
inferObjectOrder,
|
|
2142
2120
|
inferRecordOrder,
|
|
2143
|
-
intersectBy,
|
|
2144
2121
|
intersection,
|
|
2145
2122
|
iosCheck,
|
|
2146
2123
|
isNode,
|