complete-common 2.12.0 → 2.13.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/dist/functions/array.d.cts +14 -0
- package/dist/functions/array.d.mts +14 -0
- package/dist/functions/array.d.ts +14 -0
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.mjs +7 -1
- package/package.json +2 -2
- package/src/functions/array.ts +24 -0
|
@@ -51,6 +51,20 @@ export declare function arrayRemoveAllInPlace<T>(array: T[], ...elementsToRemove
|
|
|
51
51
|
export declare function arrayRemoveInPlace<T>(array: T[], ...elementsToRemove: readonly T[]): readonly T[];
|
|
52
52
|
/** Helper function to remove all of the elements in an array in-place. */
|
|
53
53
|
export declare function emptyArray(array: unknown[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to perform an asynchronous filter. The vanilla `Array.filter` method does not
|
|
56
|
+
* wait for promises (and treats them as truthy), so this function runs the predicate on all
|
|
57
|
+
* elements concurrently, awaits the results, and then filters the original array.
|
|
58
|
+
*
|
|
59
|
+
* Usage:
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* const results = await filterAsync(things, async (thing) => await filterFunc(thing));
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* (This is an abstraction around `Promise.all`.)
|
|
66
|
+
*/
|
|
67
|
+
export declare function filterAsync<T>(array: readonly T[], predicate: (element: T) => Promise<boolean>): Promise<readonly T[]>;
|
|
54
68
|
/**
|
|
55
69
|
* Helper function to perform a filter and a map at the same time. Similar to `Array.map`, provide a
|
|
56
70
|
* function that transforms a value, but return `undefined` if the value should be skipped. (Thus,
|
|
@@ -51,6 +51,20 @@ export declare function arrayRemoveAllInPlace<T>(array: T[], ...elementsToRemove
|
|
|
51
51
|
export declare function arrayRemoveInPlace<T>(array: T[], ...elementsToRemove: readonly T[]): readonly T[];
|
|
52
52
|
/** Helper function to remove all of the elements in an array in-place. */
|
|
53
53
|
export declare function emptyArray(array: unknown[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to perform an asynchronous filter. The vanilla `Array.filter` method does not
|
|
56
|
+
* wait for promises (and treats them as truthy), so this function runs the predicate on all
|
|
57
|
+
* elements concurrently, awaits the results, and then filters the original array.
|
|
58
|
+
*
|
|
59
|
+
* Usage:
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* const results = await filterAsync(things, async (thing) => await filterFunc(thing));
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* (This is an abstraction around `Promise.all`.)
|
|
66
|
+
*/
|
|
67
|
+
export declare function filterAsync<T>(array: readonly T[], predicate: (element: T) => Promise<boolean>): Promise<readonly T[]>;
|
|
54
68
|
/**
|
|
55
69
|
* Helper function to perform a filter and a map at the same time. Similar to `Array.map`, provide a
|
|
56
70
|
* function that transforms a value, but return `undefined` if the value should be skipped. (Thus,
|
|
@@ -51,6 +51,20 @@ export declare function arrayRemoveAllInPlace<T>(array: T[], ...elementsToRemove
|
|
|
51
51
|
export declare function arrayRemoveInPlace<T>(array: T[], ...elementsToRemove: readonly T[]): readonly T[];
|
|
52
52
|
/** Helper function to remove all of the elements in an array in-place. */
|
|
53
53
|
export declare function emptyArray(array: unknown[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to perform an asynchronous filter. The vanilla `Array.filter` method does not
|
|
56
|
+
* wait for promises (and treats them as truthy), so this function runs the predicate on all
|
|
57
|
+
* elements concurrently, awaits the results, and then filters the original array.
|
|
58
|
+
*
|
|
59
|
+
* Usage:
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* const results = await filterAsync(things, async (thing) => await filterFunc(thing));
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* (This is an abstraction around `Promise.all`.)
|
|
66
|
+
*/
|
|
67
|
+
export declare function filterAsync<T>(array: readonly T[], predicate: (element: T) => Promise<boolean>): Promise<readonly T[]>;
|
|
54
68
|
/**
|
|
55
69
|
* Helper function to perform a filter and a map at the same time. Similar to `Array.map`, provide a
|
|
56
70
|
* function that transforms a value, but return `undefined` if the value should be skipped. (Thus,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/functions/array.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,GACjC,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,CAQ7B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,MAAM,EAAE,SAAS,CAAC,EAAE,GACnB,OAAO,CAST;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,aAAa,EAAE,SAAS,CAAC,EAAE,EAC3B,GAAG,gBAAgB,EAAE,SAAS,CAAC,EAAE,GAChC,SAAS,CAAC,EAAE,CAWd;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAErC,KAAK,EAAE,CAAC,EAAE,EACV,GAAG,gBAAgB,EAAE,SAAS,CAAC,EAAE,GAChC,OAAO,CAeT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAElC,KAAK,EAAE,CAAC,EAAE,EACV,GAAG,gBAAgB,EAAE,SAAS,CAAC,EAAE,GAChC,SAAS,CAAC,EAAE,CAYd;AAED,0EAA0E;AAE1E,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAEjD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAClC,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,IAAI,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;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,GAAG,cAAc,EAAE,SAAS,CAAC,EAAE,GAC9B,OAAO,CAET;AAED,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,EAAE,CAEhE;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,EAAE,CAMvE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,EAAE,CAMrE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,EAAE,CAMrE;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAElE;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEzD"}
|
package/dist/index.cjs
CHANGED
|
@@ -188,6 +188,12 @@ function arrayRemoveInPlace(array, ...elementsToRemove) {
|
|
|
188
188
|
function emptyArray(array) {
|
|
189
189
|
array.splice(0);
|
|
190
190
|
}
|
|
191
|
+
async function filterAsync(array, predicate) {
|
|
192
|
+
const results = await Promise.all(
|
|
193
|
+
array.map(async (element) => await predicate(element))
|
|
194
|
+
);
|
|
195
|
+
return array.filter((_, index) => results[index] === true);
|
|
196
|
+
}
|
|
191
197
|
function filterMap(array, func) {
|
|
192
198
|
const filteredArray = [];
|
|
193
199
|
for (const element of array) {
|
|
@@ -626,6 +632,7 @@ exports.copySet = copySet;
|
|
|
626
632
|
exports.eRange = eRange;
|
|
627
633
|
exports.emptyArray = emptyArray;
|
|
628
634
|
exports.escapeHTMLCharacters = escapeHTMLCharacters;
|
|
635
|
+
exports.filterAsync = filterAsync;
|
|
629
636
|
exports.filterMap = filterMap;
|
|
630
637
|
exports.filterMapAsync = filterMapAsync;
|
|
631
638
|
exports.getElapsedSeconds = getElapsedSeconds;
|
package/dist/index.mjs
CHANGED
|
@@ -186,6 +186,12 @@ function arrayRemoveInPlace(array, ...elementsToRemove) {
|
|
|
186
186
|
function emptyArray(array) {
|
|
187
187
|
array.splice(0);
|
|
188
188
|
}
|
|
189
|
+
async function filterAsync(array, predicate) {
|
|
190
|
+
const results = await Promise.all(
|
|
191
|
+
array.map(async (element) => await predicate(element))
|
|
192
|
+
);
|
|
193
|
+
return array.filter((_, index) => results[index] === true);
|
|
194
|
+
}
|
|
189
195
|
function filterMap(array, func) {
|
|
190
196
|
const filteredArray = [];
|
|
191
197
|
for (const element of array) {
|
|
@@ -591,4 +597,4 @@ function* tupleKeys(tuple) {
|
|
|
591
597
|
|
|
592
598
|
const ReadonlyMap = Map;
|
|
593
599
|
|
|
594
|
-
export { HOUR_IN_MILLISECONDS, MINUTE_IN_MILLISECONDS, ReadonlyMap, ReadonlySet, SECOND_IN_MILLISECONDS, addSetsToSet, arrayCopyTwoDimensional, arrayEquals, arrayRemove, arrayRemoveAllInPlace, arrayRemoveInPlace, assertArray, assertArrayBoolean, assertArrayNumber, assertArrayObject, assertArrayString, assertBoolean, assertDefined, assertEnumValue, assertInteger, assertIs, assertNotNull, assertNumber, assertObject, assertString, assertStringNotEmpty, capitalizeFirstLetter, clamp, combineSets, copySet, eRange, emptyArray, escapeHTMLCharacters, filterMap, filterMapAsync, getElapsedSeconds, getEnumEntries, getEnumKeys, getEnumValues, getNumConsecutiveDiacritics, getRandomArrayElement, getRandomArrayIndex, getRandomInt, hasDiacritic, hasEmoji, hasWhitespace, iRange, includes, includesAny, interfaceSatisfiesEnum, isASCII, isArray, isArrayBoolean, isArrayNumber, isArrayString, isEnumValue, isFirstLetterCapitalized, isKebabCase, isKeyOf, isLowerCase, isObject, isSemanticVersion, isUpperCase, kebabCaseToCamelCase, kebabCaseToPascalCase, mapFilter, mapFind, newArray, noop, normalizeString, objectFilter, objectKeysToSet, objectToMap, objectToReverseMap, objectValuesToSet, parseFloatSafe, parseIntSafe, parseSemanticVersion, removeLinesBetweenMarkers, removeLinesMatching, removeNonPrintableCharacters, removeWhitespace, repeat, setAdd, setHas, sortCaseInsensitive, sumArray, todo, trimPrefix, trimSuffix, truncateString, tupleEntries, tupleKeys };
|
|
600
|
+
export { HOUR_IN_MILLISECONDS, MINUTE_IN_MILLISECONDS, ReadonlyMap, ReadonlySet, SECOND_IN_MILLISECONDS, addSetsToSet, arrayCopyTwoDimensional, arrayEquals, arrayRemove, arrayRemoveAllInPlace, arrayRemoveInPlace, assertArray, assertArrayBoolean, assertArrayNumber, assertArrayObject, assertArrayString, assertBoolean, assertDefined, assertEnumValue, assertInteger, assertIs, assertNotNull, assertNumber, assertObject, assertString, assertStringNotEmpty, capitalizeFirstLetter, clamp, combineSets, copySet, eRange, emptyArray, escapeHTMLCharacters, filterAsync, filterMap, filterMapAsync, getElapsedSeconds, getEnumEntries, getEnumKeys, getEnumValues, getNumConsecutiveDiacritics, getRandomArrayElement, getRandomArrayIndex, getRandomInt, hasDiacritic, hasEmoji, hasWhitespace, iRange, includes, includesAny, interfaceSatisfiesEnum, isASCII, isArray, isArrayBoolean, isArrayNumber, isArrayString, isEnumValue, isFirstLetterCapitalized, isKebabCase, isKeyOf, isLowerCase, isObject, isSemanticVersion, isUpperCase, kebabCaseToCamelCase, kebabCaseToPascalCase, mapFilter, mapFind, newArray, noop, normalizeString, objectFilter, objectKeysToSet, objectToMap, objectToReverseMap, objectValuesToSet, parseFloatSafe, parseIntSafe, parseSemanticVersion, removeLinesBetweenMarkers, removeLinesMatching, removeNonPrintableCharacters, removeWhitespace, repeat, setAdd, setHas, sortCaseInsensitive, sumArray, todo, trimPrefix, trimSuffix, truncateString, tupleEntries, tupleKeys };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "complete-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "Helper functions for TypeScript projects.",
|
|
5
5
|
"homepage": "https://complete-ts.github.io/",
|
|
6
6
|
"bugs": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"complete-node": "16.2.0",
|
|
36
36
|
"eslint-plugin-sort-exports": "0.9.1",
|
|
37
37
|
"typescript": "5.9.3",
|
|
38
|
-
"typescript-eslint": "8.
|
|
38
|
+
"typescript-eslint": "8.52.0",
|
|
39
39
|
"unbuild": "3.6.1"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/src/functions/array.ts
CHANGED
|
@@ -136,6 +136,30 @@ export function emptyArray(array: unknown[]): void {
|
|
|
136
136
|
array.splice(0);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Helper function to perform an asynchronous filter. The vanilla `Array.filter` method does not
|
|
141
|
+
* wait for promises (and treats them as truthy), so this function runs the predicate on all
|
|
142
|
+
* elements concurrently, awaits the results, and then filters the original array.
|
|
143
|
+
*
|
|
144
|
+
* Usage:
|
|
145
|
+
*
|
|
146
|
+
* ```ts
|
|
147
|
+
* const results = await filterAsync(things, async (thing) => await filterFunc(thing));
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* (This is an abstraction around `Promise.all`.)
|
|
151
|
+
*/
|
|
152
|
+
export async function filterAsync<T>(
|
|
153
|
+
array: readonly T[],
|
|
154
|
+
predicate: (element: T) => Promise<boolean>,
|
|
155
|
+
): Promise<readonly T[]> {
|
|
156
|
+
const results = await Promise.all(
|
|
157
|
+
array.map(async (element) => await predicate(element)),
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
return array.filter((_, index) => results[index] === true);
|
|
161
|
+
}
|
|
162
|
+
|
|
139
163
|
/**
|
|
140
164
|
* Helper function to perform a filter and a map at the same time. Similar to `Array.map`, provide a
|
|
141
165
|
* function that transforms a value, but return `undefined` if the value should be skipped. (Thus,
|