@bemoje/map 1.0.1 → 1.2.1
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/lib/ExtMap.cjs +354 -0
- package/lib/ExtMap.d.cts +110 -0
- package/lib/ExtMap.d.ts +110 -0
- package/lib/ExtMap.js +352 -0
- package/lib/TimeoutWeakMap.cjs +122 -0
- package/lib/TimeoutWeakMap.d.cts +75 -0
- package/lib/TimeoutWeakMap.d.ts +75 -0
- package/lib/TimeoutWeakMap.js +120 -0
- package/lib/countUniques.cjs +363 -0
- package/lib/countUniques.d.cts +9 -0
- package/lib/countUniques.d.ts +9 -0
- package/lib/countUniques.js +361 -0
- package/lib/entriesArray.cjs +12 -0
- package/lib/entriesArray.d.cts +19 -0
- package/lib/entriesArray.d.ts +19 -0
- package/lib/entriesArray.js +10 -0
- package/lib/index.cjs +505 -0
- package/lib/index.d.cts +17 -0
- package/lib/index.d.ts +17 -0
- package/{index.mjs → lib/index.js} +104 -90
- package/lib/isGenericMap.cjs +18 -0
- package/lib/isGenericMap.d.cts +6 -0
- package/lib/isGenericMap.d.ts +6 -0
- package/lib/isGenericMap.js +16 -0
- package/lib/keysArray.cjs +12 -0
- package/lib/keysArray.d.cts +19 -0
- package/lib/keysArray.d.ts +19 -0
- package/lib/keysArray.js +10 -0
- package/lib/mapGetOrDefault.cjs +18 -0
- package/lib/mapGetOrDefault.d.cts +8 -0
- package/lib/mapGetOrDefault.d.ts +8 -0
- package/lib/mapGetOrDefault.js +16 -0
- package/lib/mapLoad.cjs +15 -0
- package/lib/mapLoad.d.cts +11 -0
- package/lib/mapLoad.d.ts +11 -0
- package/lib/mapLoad.js +13 -0
- package/lib/mapReverse.cjs +24 -0
- package/lib/mapReverse.d.cts +15 -0
- package/lib/mapReverse.d.ts +15 -0
- package/lib/mapReverse.js +22 -0
- package/lib/mapUpdate.cjs +14 -0
- package/lib/mapUpdate.d.cts +13 -0
- package/lib/mapUpdate.d.ts +13 -0
- package/lib/mapUpdate.js +12 -0
- package/lib/sort.cjs +17 -0
- package/lib/sort.d.cts +25 -0
- package/lib/sort.d.ts +25 -0
- package/lib/sort.js +15 -0
- package/lib/sortByKeys.cjs +19 -0
- package/lib/sortByKeys.d.cts +24 -0
- package/lib/sortByKeys.d.ts +24 -0
- package/lib/sortByKeys.js +17 -0
- package/lib/sortByValues.cjs +19 -0
- package/lib/sortByValues.d.cts +25 -0
- package/lib/sortByValues.d.ts +25 -0
- package/lib/sortByValues.js +17 -0
- package/lib/toMap.cjs +12 -0
- package/lib/toMap.d.cts +20 -0
- package/lib/toMap.d.ts +20 -0
- package/lib/toMap.js +10 -0
- package/lib/valuesArray.cjs +12 -0
- package/lib/valuesArray.d.cts +19 -0
- package/lib/valuesArray.d.ts +19 -0
- package/lib/valuesArray.js +10 -0
- package/package.json +248 -18
- package/index.d.ts +0 -364
package/lib/sort.d.cts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sorts the map entries using a custom comparison function and updates the map in place.
|
|
5
|
+
* This is Map-specific because it maintains insertion order.
|
|
6
|
+
*
|
|
7
|
+
* @param ins - The map instance to sort
|
|
8
|
+
* @param compare - Function that compares two entries
|
|
9
|
+
* @returns The map instance for method chaining
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const map = new ExtMap<string, number>([
|
|
14
|
+
* ['c', 3],
|
|
15
|
+
* ['a', 1],
|
|
16
|
+
* ['b', 2],
|
|
17
|
+
* ])
|
|
18
|
+
*
|
|
19
|
+
* sort(map, ([k1], [k2]) => k1.localeCompare(k2))
|
|
20
|
+
* console.log(entriesArray(map)) // [['a', 1], ['b', 2], ['c', 3]]
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare function sort<K, V>(ins: GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, compare: (a: [K, V], b: [K, V]) => number): GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>;
|
|
24
|
+
|
|
25
|
+
export { sort };
|
package/lib/sort.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sorts the map entries using a custom comparison function and updates the map in place.
|
|
5
|
+
* This is Map-specific because it maintains insertion order.
|
|
6
|
+
*
|
|
7
|
+
* @param ins - The map instance to sort
|
|
8
|
+
* @param compare - Function that compares two entries
|
|
9
|
+
* @returns The map instance for method chaining
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const map = new ExtMap<string, number>([
|
|
14
|
+
* ['c', 3],
|
|
15
|
+
* ['a', 1],
|
|
16
|
+
* ['b', 2],
|
|
17
|
+
* ])
|
|
18
|
+
*
|
|
19
|
+
* sort(map, ([k1], [k2]) => k1.localeCompare(k2))
|
|
20
|
+
* console.log(entriesArray(map)) // [['a', 1], ['b', 2], ['c', 3]]
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare function sort<K, V>(ins: GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, compare: (a: [K, V], b: [K, V]) => number): GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>;
|
|
24
|
+
|
|
25
|
+
export { sort };
|
package/lib/sort.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/sort.ts
|
|
5
|
+
function sort(ins, compare) {
|
|
6
|
+
const entries = Array.from(ins).sort(compare);
|
|
7
|
+
ins.clear();
|
|
8
|
+
for (const [k, v] of entries) {
|
|
9
|
+
ins.set(k, v);
|
|
10
|
+
}
|
|
11
|
+
return ins;
|
|
12
|
+
}
|
|
13
|
+
__name(sort, "sort");
|
|
14
|
+
|
|
15
|
+
export { sort };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
|
|
6
|
+
// src/sortByKeys.ts
|
|
7
|
+
function sortByKeys(ins, compare) {
|
|
8
|
+
const entries = Array.from(ins).sort((a, b) => {
|
|
9
|
+
return compare(a[0], b[0]);
|
|
10
|
+
});
|
|
11
|
+
ins.clear();
|
|
12
|
+
for (const [k, v] of entries) {
|
|
13
|
+
ins.set(k, v);
|
|
14
|
+
}
|
|
15
|
+
return ins;
|
|
16
|
+
}
|
|
17
|
+
__name(sortByKeys, "sortByKeys");
|
|
18
|
+
|
|
19
|
+
exports.sortByKeys = sortByKeys;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sorts the map entries by their keys and updates the map in place.
|
|
5
|
+
*
|
|
6
|
+
* @param ins - The map instance to sort
|
|
7
|
+
* @param compare - Function that compares two keys
|
|
8
|
+
* @returns The map instance for method chaining
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const map = new ExtMap<string, number>([
|
|
13
|
+
* ['c', 3],
|
|
14
|
+
* ['a', 1],
|
|
15
|
+
* ['b', 2],
|
|
16
|
+
* ])
|
|
17
|
+
*
|
|
18
|
+
* sortByKeys(map, (a, b) => a.localeCompare(b))
|
|
19
|
+
* console.log(entriesArray(map)) // [['a', 1], ['b', 2], ['c', 3]]
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function sortByKeys<K, V>(ins: GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, compare: (a: K, b: K) => number): GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>;
|
|
23
|
+
|
|
24
|
+
export { sortByKeys };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sorts the map entries by their keys and updates the map in place.
|
|
5
|
+
*
|
|
6
|
+
* @param ins - The map instance to sort
|
|
7
|
+
* @param compare - Function that compares two keys
|
|
8
|
+
* @returns The map instance for method chaining
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const map = new ExtMap<string, number>([
|
|
13
|
+
* ['c', 3],
|
|
14
|
+
* ['a', 1],
|
|
15
|
+
* ['b', 2],
|
|
16
|
+
* ])
|
|
17
|
+
*
|
|
18
|
+
* sortByKeys(map, (a, b) => a.localeCompare(b))
|
|
19
|
+
* console.log(entriesArray(map)) // [['a', 1], ['b', 2], ['c', 3]]
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function sortByKeys<K, V>(ins: GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, compare: (a: K, b: K) => number): GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>;
|
|
23
|
+
|
|
24
|
+
export { sortByKeys };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/sortByKeys.ts
|
|
5
|
+
function sortByKeys(ins, compare) {
|
|
6
|
+
const entries = Array.from(ins).sort((a, b) => {
|
|
7
|
+
return compare(a[0], b[0]);
|
|
8
|
+
});
|
|
9
|
+
ins.clear();
|
|
10
|
+
for (const [k, v] of entries) {
|
|
11
|
+
ins.set(k, v);
|
|
12
|
+
}
|
|
13
|
+
return ins;
|
|
14
|
+
}
|
|
15
|
+
__name(sortByKeys, "sortByKeys");
|
|
16
|
+
|
|
17
|
+
export { sortByKeys };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
|
|
6
|
+
// src/sortByValues.ts
|
|
7
|
+
function sortByValues(ins, compare) {
|
|
8
|
+
const entries = Array.from(ins).sort((a, b) => {
|
|
9
|
+
return compare(a[1], b[1]);
|
|
10
|
+
});
|
|
11
|
+
ins.clear();
|
|
12
|
+
for (const [k, v] of entries) {
|
|
13
|
+
ins.set(k, v);
|
|
14
|
+
}
|
|
15
|
+
return ins;
|
|
16
|
+
}
|
|
17
|
+
__name(sortByValues, "sortByValues");
|
|
18
|
+
|
|
19
|
+
exports.sortByValues = sortByValues;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sorts the map entries by their values and updates the map in place.
|
|
5
|
+
*
|
|
6
|
+
* @param ins - The map instance to sort
|
|
7
|
+
* @param compare - Function that compares two values
|
|
8
|
+
* @returns The map instance for method chaining
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const map = new ExtMap<string, number>([
|
|
13
|
+
* ['c', 3],
|
|
14
|
+
* ['a', 1],
|
|
15
|
+
* ['b', 2],
|
|
16
|
+
* ])
|
|
17
|
+
*
|
|
18
|
+
* sortByValues(map, (a, b) => a - b)
|
|
19
|
+
* console.log(entriesArray(map)) // [['a', 1], ['b', 2], ['c', 3]]
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function sortByValues<T extends GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, K, V>(ins: T, compare: (a: V, b: V) => number): T;
|
|
23
|
+
declare function sortByValues<K, V>(ins: GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, compare: (a: V, b: V) => number): GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>;
|
|
24
|
+
|
|
25
|
+
export { sortByValues };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sorts the map entries by their values and updates the map in place.
|
|
5
|
+
*
|
|
6
|
+
* @param ins - The map instance to sort
|
|
7
|
+
* @param compare - Function that compares two values
|
|
8
|
+
* @returns The map instance for method chaining
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const map = new ExtMap<string, number>([
|
|
13
|
+
* ['c', 3],
|
|
14
|
+
* ['a', 1],
|
|
15
|
+
* ['b', 2],
|
|
16
|
+
* ])
|
|
17
|
+
*
|
|
18
|
+
* sortByValues(map, (a, b) => a - b)
|
|
19
|
+
* console.log(entriesArray(map)) // [['a', 1], ['b', 2], ['c', 3]]
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function sortByValues<T extends GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, K, V>(ins: T, compare: (a: V, b: V) => number): T;
|
|
23
|
+
declare function sortByValues<K, V>(ins: GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>, compare: (a: V, b: V) => number): GenericMap<K, V, 'set' | 'clear' | typeof Symbol.iterator>;
|
|
24
|
+
|
|
25
|
+
export { sortByValues };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/sortByValues.ts
|
|
5
|
+
function sortByValues(ins, compare) {
|
|
6
|
+
const entries = Array.from(ins).sort((a, b) => {
|
|
7
|
+
return compare(a[1], b[1]);
|
|
8
|
+
});
|
|
9
|
+
ins.clear();
|
|
10
|
+
for (const [k, v] of entries) {
|
|
11
|
+
ins.set(k, v);
|
|
12
|
+
}
|
|
13
|
+
return ins;
|
|
14
|
+
}
|
|
15
|
+
__name(sortByValues, "sortByValues");
|
|
16
|
+
|
|
17
|
+
export { sortByValues };
|
package/lib/toMap.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
|
|
6
|
+
// src/toMap.ts
|
|
7
|
+
function toMap(ins) {
|
|
8
|
+
return new Map(ins);
|
|
9
|
+
}
|
|
10
|
+
__name(toMap, "toMap");
|
|
11
|
+
|
|
12
|
+
exports.toMap = toMap;
|
package/lib/toMap.d.cts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Converts a GenericMap to a native Map.
|
|
5
|
+
*
|
|
6
|
+
* @param ins - The GenericMap instance to convert
|
|
7
|
+
* @returns A new native Map with the same entries
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const extMap = new ExtMap<string, number>()
|
|
12
|
+
* .load([['a', 1], ['b', 2], ['c', 3]])
|
|
13
|
+
*
|
|
14
|
+
* const nativeMap = toMap(extMap)
|
|
15
|
+
* console.log(nativeMap instanceof Map) // true
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare function toMap<K, V>(ins: GenericMap<K, V, typeof Symbol.iterator>): Map<K, V>;
|
|
19
|
+
|
|
20
|
+
export { toMap };
|
package/lib/toMap.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Converts a GenericMap to a native Map.
|
|
5
|
+
*
|
|
6
|
+
* @param ins - The GenericMap instance to convert
|
|
7
|
+
* @returns A new native Map with the same entries
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const extMap = new ExtMap<string, number>()
|
|
12
|
+
* .load([['a', 1], ['b', 2], ['c', 3]])
|
|
13
|
+
*
|
|
14
|
+
* const nativeMap = toMap(extMap)
|
|
15
|
+
* console.log(nativeMap instanceof Map) // true
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare function toMap<K, V>(ins: GenericMap<K, V, typeof Symbol.iterator>): Map<K, V>;
|
|
19
|
+
|
|
20
|
+
export { toMap };
|
package/lib/toMap.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
+
|
|
6
|
+
// src/valuesArray.ts
|
|
7
|
+
function valuesArray(ins) {
|
|
8
|
+
return Array.from(ins.values());
|
|
9
|
+
}
|
|
10
|
+
__name(valuesArray, "valuesArray");
|
|
11
|
+
|
|
12
|
+
exports.valuesArray = valuesArray;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns an array of all values in the map.
|
|
5
|
+
* Convenience method that converts the values iterator to an array.
|
|
6
|
+
*
|
|
7
|
+
* @returns Array of all values
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const map = new ExtMap<string, number>()
|
|
12
|
+
* .load([['a', 1], ['b', 2], ['c', 3]])
|
|
13
|
+
*
|
|
14
|
+
* console.log(valuesArray(map)) // [1, 2, 3]
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare function valuesArray<K, V>(ins: GenericMap<K, V, 'values'>): V[];
|
|
18
|
+
|
|
19
|
+
export { valuesArray };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { G as GenericMap } from './GenericMap-B4OM3vGu.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns an array of all values in the map.
|
|
5
|
+
* Convenience method that converts the values iterator to an array.
|
|
6
|
+
*
|
|
7
|
+
* @returns Array of all values
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const map = new ExtMap<string, number>()
|
|
12
|
+
* .load([['a', 1], ['b', 2], ['c', 3]])
|
|
13
|
+
*
|
|
14
|
+
* console.log(valuesArray(map)) // [1, 2, 3]
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare function valuesArray<K, V>(ins: GenericMap<K, V, 'values'>): V[];
|
|
18
|
+
|
|
19
|
+
export { valuesArray };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/valuesArray.ts
|
|
5
|
+
function valuesArray(ins) {
|
|
6
|
+
return Array.from(ins.values());
|
|
7
|
+
}
|
|
8
|
+
__name(valuesArray, "valuesArray");
|
|
9
|
+
|
|
10
|
+
export { valuesArray };
|
package/package.json
CHANGED
|
@@ -1,35 +1,265 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bemoje/map",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
5
|
-
"type": "module",
|
|
6
|
-
"sideEffects": false,
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Extended Map class and utilities for sorting, filtering, mapping, and managing key-value data.",
|
|
7
5
|
"keywords": [
|
|
8
|
-
"map"
|
|
6
|
+
"map",
|
|
7
|
+
"key-value",
|
|
8
|
+
"sorting",
|
|
9
|
+
"filtering",
|
|
10
|
+
"data-structures",
|
|
11
|
+
"utilities",
|
|
12
|
+
"typescript"
|
|
9
13
|
],
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./index.d.ts",
|
|
13
|
-
"import": "./index.mjs",
|
|
14
|
-
"default": "./index.mjs"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
14
|
"dependencies": {
|
|
18
15
|
"iter-tools": "^7.5.4",
|
|
19
16
|
"mnemonist": "^0.40.3"
|
|
20
17
|
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"sideEffects": false,
|
|
21
20
|
"publishConfig": {
|
|
22
21
|
"access": "public"
|
|
23
22
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
23
|
+
"main": "./lib/index.cjs",
|
|
24
|
+
"module": "./lib/index.js",
|
|
25
|
+
"types": "./lib/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./lib/index.d.ts",
|
|
30
|
+
"default": "./lib/index.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./lib/index.d.cts",
|
|
34
|
+
"default": "./lib/index.cjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"./ExtMap": {
|
|
38
|
+
"import": {
|
|
39
|
+
"types": "./lib/ExtMap.d.ts",
|
|
40
|
+
"default": "./lib/ExtMap.js"
|
|
41
|
+
},
|
|
42
|
+
"require": {
|
|
43
|
+
"types": "./lib/ExtMap.d.cts",
|
|
44
|
+
"default": "./lib/ExtMap.cjs"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"./TimeoutWeakMap": {
|
|
48
|
+
"import": {
|
|
49
|
+
"types": "./lib/TimeoutWeakMap.d.ts",
|
|
50
|
+
"default": "./lib/TimeoutWeakMap.js"
|
|
51
|
+
},
|
|
52
|
+
"require": {
|
|
53
|
+
"types": "./lib/TimeoutWeakMap.d.cts",
|
|
54
|
+
"default": "./lib/TimeoutWeakMap.cjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"./countUniques": {
|
|
58
|
+
"import": {
|
|
59
|
+
"types": "./lib/countUniques.d.ts",
|
|
60
|
+
"default": "./lib/countUniques.js"
|
|
61
|
+
},
|
|
62
|
+
"require": {
|
|
63
|
+
"types": "./lib/countUniques.d.cts",
|
|
64
|
+
"default": "./lib/countUniques.cjs"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"./entriesArray": {
|
|
68
|
+
"import": {
|
|
69
|
+
"types": "./lib/entriesArray.d.ts",
|
|
70
|
+
"default": "./lib/entriesArray.js"
|
|
71
|
+
},
|
|
72
|
+
"require": {
|
|
73
|
+
"types": "./lib/entriesArray.d.cts",
|
|
74
|
+
"default": "./lib/entriesArray.cjs"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"./isGenericMap": {
|
|
78
|
+
"import": {
|
|
79
|
+
"types": "./lib/isGenericMap.d.ts",
|
|
80
|
+
"default": "./lib/isGenericMap.js"
|
|
81
|
+
},
|
|
82
|
+
"require": {
|
|
83
|
+
"types": "./lib/isGenericMap.d.cts",
|
|
84
|
+
"default": "./lib/isGenericMap.cjs"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"./keysArray": {
|
|
88
|
+
"import": {
|
|
89
|
+
"types": "./lib/keysArray.d.ts",
|
|
90
|
+
"default": "./lib/keysArray.js"
|
|
91
|
+
},
|
|
92
|
+
"require": {
|
|
93
|
+
"types": "./lib/keysArray.d.cts",
|
|
94
|
+
"default": "./lib/keysArray.cjs"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"./mapGetOrDefault": {
|
|
98
|
+
"import": {
|
|
99
|
+
"types": "./lib/mapGetOrDefault.d.ts",
|
|
100
|
+
"default": "./lib/mapGetOrDefault.js"
|
|
101
|
+
},
|
|
102
|
+
"require": {
|
|
103
|
+
"types": "./lib/mapGetOrDefault.d.cts",
|
|
104
|
+
"default": "./lib/mapGetOrDefault.cjs"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"./mapLoad": {
|
|
108
|
+
"import": {
|
|
109
|
+
"types": "./lib/mapLoad.d.ts",
|
|
110
|
+
"default": "./lib/mapLoad.js"
|
|
111
|
+
},
|
|
112
|
+
"require": {
|
|
113
|
+
"types": "./lib/mapLoad.d.cts",
|
|
114
|
+
"default": "./lib/mapLoad.cjs"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"./mapReverse": {
|
|
118
|
+
"import": {
|
|
119
|
+
"types": "./lib/mapReverse.d.ts",
|
|
120
|
+
"default": "./lib/mapReverse.js"
|
|
121
|
+
},
|
|
122
|
+
"require": {
|
|
123
|
+
"types": "./lib/mapReverse.d.cts",
|
|
124
|
+
"default": "./lib/mapReverse.cjs"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"./mapUpdate": {
|
|
128
|
+
"import": {
|
|
129
|
+
"types": "./lib/mapUpdate.d.ts",
|
|
130
|
+
"default": "./lib/mapUpdate.js"
|
|
131
|
+
},
|
|
132
|
+
"require": {
|
|
133
|
+
"types": "./lib/mapUpdate.d.cts",
|
|
134
|
+
"default": "./lib/mapUpdate.cjs"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"./sort": {
|
|
138
|
+
"import": {
|
|
139
|
+
"types": "./lib/sort.d.ts",
|
|
140
|
+
"default": "./lib/sort.js"
|
|
141
|
+
},
|
|
142
|
+
"require": {
|
|
143
|
+
"types": "./lib/sort.d.cts",
|
|
144
|
+
"default": "./lib/sort.cjs"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"./sortByKeys": {
|
|
148
|
+
"import": {
|
|
149
|
+
"types": "./lib/sortByKeys.d.ts",
|
|
150
|
+
"default": "./lib/sortByKeys.js"
|
|
151
|
+
},
|
|
152
|
+
"require": {
|
|
153
|
+
"types": "./lib/sortByKeys.d.cts",
|
|
154
|
+
"default": "./lib/sortByKeys.cjs"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"./sortByValues": {
|
|
158
|
+
"import": {
|
|
159
|
+
"types": "./lib/sortByValues.d.ts",
|
|
160
|
+
"default": "./lib/sortByValues.js"
|
|
161
|
+
},
|
|
162
|
+
"require": {
|
|
163
|
+
"types": "./lib/sortByValues.d.cts",
|
|
164
|
+
"default": "./lib/sortByValues.cjs"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"./toMap": {
|
|
168
|
+
"import": {
|
|
169
|
+
"types": "./lib/toMap.d.ts",
|
|
170
|
+
"default": "./lib/toMap.js"
|
|
171
|
+
},
|
|
172
|
+
"require": {
|
|
173
|
+
"types": "./lib/toMap.d.cts",
|
|
174
|
+
"default": "./lib/toMap.cjs"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"./valuesArray": {
|
|
178
|
+
"import": {
|
|
179
|
+
"types": "./lib/valuesArray.d.ts",
|
|
180
|
+
"default": "./lib/valuesArray.js"
|
|
181
|
+
},
|
|
182
|
+
"require": {
|
|
183
|
+
"types": "./lib/valuesArray.d.cts",
|
|
184
|
+
"default": "./lib/valuesArray.cjs"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
29
187
|
},
|
|
188
|
+
"files": [
|
|
189
|
+
"./lib/index.js",
|
|
190
|
+
"./lib/index.d.ts",
|
|
191
|
+
"./lib/index.cjs",
|
|
192
|
+
"./lib/index.d.cts",
|
|
193
|
+
"./lib/ExtMap.js",
|
|
194
|
+
"./lib/ExtMap.d.ts",
|
|
195
|
+
"./lib/ExtMap.cjs",
|
|
196
|
+
"./lib/ExtMap.d.cts",
|
|
197
|
+
"./lib/TimeoutWeakMap.js",
|
|
198
|
+
"./lib/TimeoutWeakMap.d.ts",
|
|
199
|
+
"./lib/TimeoutWeakMap.cjs",
|
|
200
|
+
"./lib/TimeoutWeakMap.d.cts",
|
|
201
|
+
"./lib/countUniques.js",
|
|
202
|
+
"./lib/countUniques.d.ts",
|
|
203
|
+
"./lib/countUniques.cjs",
|
|
204
|
+
"./lib/countUniques.d.cts",
|
|
205
|
+
"./lib/entriesArray.js",
|
|
206
|
+
"./lib/entriesArray.d.ts",
|
|
207
|
+
"./lib/entriesArray.cjs",
|
|
208
|
+
"./lib/entriesArray.d.cts",
|
|
209
|
+
"./lib/isGenericMap.js",
|
|
210
|
+
"./lib/isGenericMap.d.ts",
|
|
211
|
+
"./lib/isGenericMap.cjs",
|
|
212
|
+
"./lib/isGenericMap.d.cts",
|
|
213
|
+
"./lib/keysArray.js",
|
|
214
|
+
"./lib/keysArray.d.ts",
|
|
215
|
+
"./lib/keysArray.cjs",
|
|
216
|
+
"./lib/keysArray.d.cts",
|
|
217
|
+
"./lib/mapGetOrDefault.js",
|
|
218
|
+
"./lib/mapGetOrDefault.d.ts",
|
|
219
|
+
"./lib/mapGetOrDefault.cjs",
|
|
220
|
+
"./lib/mapGetOrDefault.d.cts",
|
|
221
|
+
"./lib/mapLoad.js",
|
|
222
|
+
"./lib/mapLoad.d.ts",
|
|
223
|
+
"./lib/mapLoad.cjs",
|
|
224
|
+
"./lib/mapLoad.d.cts",
|
|
225
|
+
"./lib/mapReverse.js",
|
|
226
|
+
"./lib/mapReverse.d.ts",
|
|
227
|
+
"./lib/mapReverse.cjs",
|
|
228
|
+
"./lib/mapReverse.d.cts",
|
|
229
|
+
"./lib/mapUpdate.js",
|
|
230
|
+
"./lib/mapUpdate.d.ts",
|
|
231
|
+
"./lib/mapUpdate.cjs",
|
|
232
|
+
"./lib/mapUpdate.d.cts",
|
|
233
|
+
"./lib/sort.js",
|
|
234
|
+
"./lib/sort.d.ts",
|
|
235
|
+
"./lib/sort.cjs",
|
|
236
|
+
"./lib/sort.d.cts",
|
|
237
|
+
"./lib/sortByKeys.js",
|
|
238
|
+
"./lib/sortByKeys.d.ts",
|
|
239
|
+
"./lib/sortByKeys.cjs",
|
|
240
|
+
"./lib/sortByKeys.d.cts",
|
|
241
|
+
"./lib/sortByValues.js",
|
|
242
|
+
"./lib/sortByValues.d.ts",
|
|
243
|
+
"./lib/sortByValues.cjs",
|
|
244
|
+
"./lib/sortByValues.d.cts",
|
|
245
|
+
"./lib/toMap.js",
|
|
246
|
+
"./lib/toMap.d.ts",
|
|
247
|
+
"./lib/toMap.cjs",
|
|
248
|
+
"./lib/toMap.d.cts",
|
|
249
|
+
"./lib/valuesArray.js",
|
|
250
|
+
"./lib/valuesArray.d.ts",
|
|
251
|
+
"./lib/valuesArray.cjs",
|
|
252
|
+
"./lib/valuesArray.d.cts"
|
|
253
|
+
],
|
|
30
254
|
"repository": {
|
|
31
255
|
"type": "git",
|
|
32
256
|
"url": "git+https://github.com/bemoje/mono.git",
|
|
33
257
|
"directory": "libs/map"
|
|
34
|
-
}
|
|
258
|
+
},
|
|
259
|
+
"author": {
|
|
260
|
+
"name": "Benjamin Møller Jensen",
|
|
261
|
+
"email": "bemoje@bemoje.net",
|
|
262
|
+
"url": "https://github.com/bemoje/"
|
|
263
|
+
},
|
|
264
|
+
"license": "MIT"
|
|
35
265
|
}
|