@punks/backend-core 0.0.65 → 0.0.66
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/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/types/index.d.ts +1 -0
- package/dist/cjs/types/utils/threading.d.ts +1 -0
- package/dist/esm/index.js +8 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/types/index.d.ts +1 -0
- package/dist/esm/types/utils/threading.d.ts +1 -0
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -358,6 +358,13 @@ const pluralize = (word) => {
|
|
|
358
358
|
function sleep(ms) {
|
|
359
359
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
360
360
|
}
|
|
361
|
+
const mapAsync = async (array, callback) => {
|
|
362
|
+
const result = [];
|
|
363
|
+
for (let i = 0; i < array.length; i++) {
|
|
364
|
+
result.push(await callback(array[i], i, array));
|
|
365
|
+
}
|
|
366
|
+
return result;
|
|
367
|
+
};
|
|
361
368
|
|
|
362
369
|
const buildNode = async (record, { ancestors, nodesDict, childrenDict, nodeBuilder, }) => {
|
|
363
370
|
const children = childrenDict.get(nodeBuilder.idSelector(record)) || [];
|
|
@@ -28736,5 +28743,5 @@ const processArrayItemMove = (items, input) => {
|
|
|
28736
28743
|
}));
|
|
28737
28744
|
};
|
|
28738
28745
|
|
|
28739
|
-
export { ConsoleLogger, DatadogLogger, ExcelKeyTransform, FileLogger, Log, LogLevel, MetaSerializationType, addTime, buildObject, buildTree, buildUrl, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, deserializeQueryString, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, getQueryParameter, groupBy, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, serializeQueryString, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart, updateQueryParameters };
|
|
28746
|
+
export { ConsoleLogger, DatadogLogger, ExcelKeyTransform, FileLogger, Log, LogLevel, MetaSerializationType, addTime, buildObject, buildTree, buildUrl, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, deserializeQueryString, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, getQueryParameter, groupBy, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapAsync, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, serializeQueryString, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart, updateQueryParameters };
|
|
28740
28747
|
//# sourceMappingURL=index.js.map
|