@jdsalasc/solvejs-list 1.0.2 → 1.2.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/README.md +8 -11
- package/dist/cjs/index.cjs +67 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +33 -0
- package/dist/esm/index.js +63 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
# @jdsalasc/solvejs-list
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Zero-dependency array/list tools for common data transformation workflows.
|
|
4
|
+
|
|
5
|
+
## Tools Included
|
|
6
|
+
|
|
7
|
+
- `unique`, `compact`, `chunk`
|
|
8
|
+
- `groupBy`, `keyBy`
|
|
9
|
+
- `partition`, `intersection`
|
|
10
|
+
- `sortBy`
|
|
4
11
|
|
|
5
12
|
## Install
|
|
6
13
|
|
|
7
14
|
```bash
|
|
8
15
|
npm i @jdsalasc/solvejs-list
|
|
9
16
|
```
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import { unique, chunk, groupBy } from "@jdsalasc/solvejs-list";
|
|
15
|
-
|
|
16
|
-
unique([1, 1, 2, 3]);
|
|
17
|
-
chunk([1, 2, 3, 4], 2);
|
|
18
|
-
groupBy(["one", "two", "three"], item => item.length);
|
|
19
|
-
```
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -4,6 +4,10 @@ exports.unique = unique;
|
|
|
4
4
|
exports.compact = compact;
|
|
5
5
|
exports.chunk = chunk;
|
|
6
6
|
exports.groupBy = groupBy;
|
|
7
|
+
exports.partition = partition;
|
|
8
|
+
exports.keyBy = keyBy;
|
|
9
|
+
exports.intersection = intersection;
|
|
10
|
+
exports.sortBy = sortBy;
|
|
7
11
|
/**
|
|
8
12
|
* Removes duplicate values preserving first-seen order.
|
|
9
13
|
*
|
|
@@ -57,4 +61,67 @@ function groupBy(values, selector) {
|
|
|
57
61
|
return accumulator;
|
|
58
62
|
}, {});
|
|
59
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Partitions values into two groups based on a predicate.
|
|
66
|
+
*
|
|
67
|
+
* @param values - Input collection.
|
|
68
|
+
* @param predicate - Predicate function.
|
|
69
|
+
* @returns Tuple with `[matched, unmatched]` values.
|
|
70
|
+
*/
|
|
71
|
+
function partition(values, predicate) {
|
|
72
|
+
const matched = [];
|
|
73
|
+
const unmatched = [];
|
|
74
|
+
for (const value of values) {
|
|
75
|
+
if (predicate(value)) {
|
|
76
|
+
matched.push(value);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
unmatched.push(value);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return [matched, unmatched];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Creates an object map from list values keyed by selector output.
|
|
86
|
+
*
|
|
87
|
+
* @param values - Input collection.
|
|
88
|
+
* @param selector - Key selector function.
|
|
89
|
+
* @returns Object map of values by key.
|
|
90
|
+
*/
|
|
91
|
+
function keyBy(values, selector) {
|
|
92
|
+
return values.reduce((accumulator, value) => {
|
|
93
|
+
accumulator[selector(value)] = value;
|
|
94
|
+
return accumulator;
|
|
95
|
+
}, {});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns intersection between two arrays preserving order from the first one.
|
|
99
|
+
*
|
|
100
|
+
* @param left - Left collection.
|
|
101
|
+
* @param right - Right collection.
|
|
102
|
+
* @returns Values found in both collections.
|
|
103
|
+
*/
|
|
104
|
+
function intersection(left, right) {
|
|
105
|
+
const rightSet = new Set(right);
|
|
106
|
+
return left.filter((value) => rightSet.has(value));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Sorts values by selector output.
|
|
110
|
+
*
|
|
111
|
+
* @param values - Input collection.
|
|
112
|
+
* @param selector - Function selecting sortable key.
|
|
113
|
+
* @param order - Sort order.
|
|
114
|
+
* @returns New sorted array.
|
|
115
|
+
*/
|
|
116
|
+
function sortBy(values, selector, order = "asc") {
|
|
117
|
+
const factor = order === "asc" ? 1 : -1;
|
|
118
|
+
return [...values].sort((a, b) => {
|
|
119
|
+
const left = selector(a);
|
|
120
|
+
const right = selector(b);
|
|
121
|
+
if (left === right) {
|
|
122
|
+
return 0;
|
|
123
|
+
}
|
|
124
|
+
return left > right ? factor : -factor;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
60
127
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAMA,wBAEC;AAQD,0BAEC;AAUD,sBAUC;AASD,0BASC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAMA,wBAEC;AAQD,0BAEC;AAUD,sBAUC;AASD,0BASC;AASD,8BAWC;AASD,sBAKC;AASD,oCAGC;AAUD,wBAcC;AA9HD;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,MAAoB;IAC5C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAI,MAA0D;IACnF,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAQ,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,KAAK,CAAI,MAAoB,EAAE,IAAY;IACzD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,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,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC;QACrC,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,EAAkB,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAI,IAAkB,EAAE,KAAmB;IACrE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,MAAM,CACpB,MAAoB,EACpB,QAAyB,EACzB,QAAwB,KAAK;IAE7B,MAAM,MAAM,GAAG,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;YACnB,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -29,3 +29,36 @@ export declare function chunk<T>(values: readonly T[], size: number): T[][];
|
|
|
29
29
|
* @returns Object whose keys map to grouped arrays.
|
|
30
30
|
*/
|
|
31
31
|
export declare function groupBy<T, K extends PropertyKey>(values: readonly T[], selector: (value: T) => K): Record<K, T[]>;
|
|
32
|
+
/**
|
|
33
|
+
* Partitions values into two groups based on a predicate.
|
|
34
|
+
*
|
|
35
|
+
* @param values - Input collection.
|
|
36
|
+
* @param predicate - Predicate function.
|
|
37
|
+
* @returns Tuple with `[matched, unmatched]` values.
|
|
38
|
+
*/
|
|
39
|
+
export declare function partition<T>(values: readonly T[], predicate: (value: T) => boolean): [T[], T[]];
|
|
40
|
+
/**
|
|
41
|
+
* Creates an object map from list values keyed by selector output.
|
|
42
|
+
*
|
|
43
|
+
* @param values - Input collection.
|
|
44
|
+
* @param selector - Key selector function.
|
|
45
|
+
* @returns Object map of values by key.
|
|
46
|
+
*/
|
|
47
|
+
export declare function keyBy<T, K extends PropertyKey>(values: readonly T[], selector: (value: T) => K): Record<K, T>;
|
|
48
|
+
/**
|
|
49
|
+
* Returns intersection between two arrays preserving order from the first one.
|
|
50
|
+
*
|
|
51
|
+
* @param left - Left collection.
|
|
52
|
+
* @param right - Right collection.
|
|
53
|
+
* @returns Values found in both collections.
|
|
54
|
+
*/
|
|
55
|
+
export declare function intersection<T>(left: readonly T[], right: readonly T[]): T[];
|
|
56
|
+
/**
|
|
57
|
+
* Sorts values by selector output.
|
|
58
|
+
*
|
|
59
|
+
* @param values - Input collection.
|
|
60
|
+
* @param selector - Function selecting sortable key.
|
|
61
|
+
* @param order - Sort order.
|
|
62
|
+
* @returns New sorted array.
|
|
63
|
+
*/
|
|
64
|
+
export declare function sortBy<T, K extends number | string>(values: readonly T[], selector: (value: T) => K, order?: "asc" | "desc"): T[];
|
package/dist/esm/index.js
CHANGED
|
@@ -51,4 +51,67 @@ export function groupBy(values, selector) {
|
|
|
51
51
|
return accumulator;
|
|
52
52
|
}, {});
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Partitions values into two groups based on a predicate.
|
|
56
|
+
*
|
|
57
|
+
* @param values - Input collection.
|
|
58
|
+
* @param predicate - Predicate function.
|
|
59
|
+
* @returns Tuple with `[matched, unmatched]` values.
|
|
60
|
+
*/
|
|
61
|
+
export function partition(values, predicate) {
|
|
62
|
+
const matched = [];
|
|
63
|
+
const unmatched = [];
|
|
64
|
+
for (const value of values) {
|
|
65
|
+
if (predicate(value)) {
|
|
66
|
+
matched.push(value);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
unmatched.push(value);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return [matched, unmatched];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Creates an object map from list values keyed by selector output.
|
|
76
|
+
*
|
|
77
|
+
* @param values - Input collection.
|
|
78
|
+
* @param selector - Key selector function.
|
|
79
|
+
* @returns Object map of values by key.
|
|
80
|
+
*/
|
|
81
|
+
export function keyBy(values, selector) {
|
|
82
|
+
return values.reduce((accumulator, value) => {
|
|
83
|
+
accumulator[selector(value)] = value;
|
|
84
|
+
return accumulator;
|
|
85
|
+
}, {});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Returns intersection between two arrays preserving order from the first one.
|
|
89
|
+
*
|
|
90
|
+
* @param left - Left collection.
|
|
91
|
+
* @param right - Right collection.
|
|
92
|
+
* @returns Values found in both collections.
|
|
93
|
+
*/
|
|
94
|
+
export function intersection(left, right) {
|
|
95
|
+
const rightSet = new Set(right);
|
|
96
|
+
return left.filter((value) => rightSet.has(value));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Sorts values by selector output.
|
|
100
|
+
*
|
|
101
|
+
* @param values - Input collection.
|
|
102
|
+
* @param selector - Function selecting sortable key.
|
|
103
|
+
* @param order - Sort order.
|
|
104
|
+
* @returns New sorted array.
|
|
105
|
+
*/
|
|
106
|
+
export function sortBy(values, selector, order = "asc") {
|
|
107
|
+
const factor = order === "asc" ? 1 : -1;
|
|
108
|
+
return [...values].sort((a, b) => {
|
|
109
|
+
const left = selector(a);
|
|
110
|
+
const right = selector(b);
|
|
111
|
+
if (left === right) {
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
114
|
+
return left > right ? factor : -factor;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
54
117
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAI,MAAoB;IAC5C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAI,MAA0D;IACnF,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAQ,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,KAAK,CAAI,MAAoB,EAAE,IAAY;IACzD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC;QACzD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAA2B,MAAoB,EAAE,QAAyB;IAC/F,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE;QAC1C,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,WAAW,CAAC,GAAG,CAA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KAAK;IAE7B,MAAM,MAAM,GAAG,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;YACnB,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jdsalasc/solvejs-list",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Zero-dependency list toolkit for JS/TS: chunk, groupBy, keyBy, partition, intersection, and sortBy.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -43,10 +43,12 @@
|
|
|
43
43
|
"node": ">=18"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
|
-
"array
|
|
46
|
+
"array utils",
|
|
47
|
+
"list utils",
|
|
47
48
|
"groupby",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
49
|
+
"partition",
|
|
50
|
+
"intersection",
|
|
51
|
+
"sortby",
|
|
50
52
|
"solvejs"
|
|
51
53
|
]
|
|
52
54
|
}
|