@punks/backend-core 0.0.69 → 0.0.71
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./array";
|
|
2
|
-
export { addTime, subtractTime, TimeUnit } from "./dates";
|
|
3
|
-
export { CsvColumnDefinition
|
|
2
|
+
export { addTime, subtractTime, floorDateToSecond, TimeUnit } from "./dates";
|
|
3
|
+
export { CsvColumnDefinition, CsvBuildOptions, csvBuild, csvParse } from "./csv";
|
|
4
4
|
export { getDirectoryFilePaths } from "./files";
|
|
5
5
|
export { joinPath, splitPath, ensureDirectory, getDirectoryPath, createDayPath, } from "./paths";
|
|
6
6
|
export * from "./strings";
|
|
@@ -10,5 +10,5 @@ export * from "./threading";
|
|
|
10
10
|
export { buildTree, TreeNodeBuilder } from "./trees";
|
|
11
11
|
export * from "./mappings";
|
|
12
12
|
export * from "./uid";
|
|
13
|
-
export { serializeQueryString, buildUrl, deserializeQueryString, getQueryParameter, updateQueryParameters, } from "./urls";
|
|
14
|
-
export { ExcelSheetDefinition, ExcelKeyTransform, ExcelColumnDefinition
|
|
13
|
+
export { serializeQueryString, buildUrl, deserializeQueryString, getQueryParameter, updateQueryParameters, joinUrl, } from "./urls";
|
|
14
|
+
export { ExcelSheetDefinition, ExcelKeyTransform, ExcelColumnDefinition, ExcelParseOptions, excelBuild, excelParse, } from "./xls";
|
package/dist/esm/index.js
CHANGED
|
@@ -160,6 +160,11 @@ const subtractTime = (date, offset) => {
|
|
|
160
160
|
unit: offset.unit,
|
|
161
161
|
});
|
|
162
162
|
};
|
|
163
|
+
function floorDateToSecond(date) {
|
|
164
|
+
const flooredDate = new Date(date);
|
|
165
|
+
flooredDate.setMilliseconds(0);
|
|
166
|
+
return flooredDate;
|
|
167
|
+
}
|
|
163
168
|
|
|
164
169
|
const DEFAULT_DELIMITER = ";";
|
|
165
170
|
const splitRows = (data) => {
|
|
@@ -424,6 +429,9 @@ function serializeQueryString(obj) {
|
|
|
424
429
|
}
|
|
425
430
|
return queryString;
|
|
426
431
|
}
|
|
432
|
+
const joinUrl = (base, path) => {
|
|
433
|
+
return `${base.replace(/\/$/, "")}/${path.replace(/^\//, "")}`;
|
|
434
|
+
};
|
|
427
435
|
const buildUrl = (path, query) => {
|
|
428
436
|
const queryString = serializeQueryString(query);
|
|
429
437
|
return queryString ? `${path}?${queryString}` : path;
|
|
@@ -31175,5 +31183,5 @@ const processArrayItemMove = (items, input) => {
|
|
|
31175
31183
|
}));
|
|
31176
31184
|
};
|
|
31177
31185
|
|
|
31178
|
-
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 };
|
|
31186
|
+
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, floorDateToSecond, getDirectoryFilePaths, getDirectoryPath, getQueryParameter, groupBy, indexes, isNullOrUndefined, iterate, joinPath, joinUrl, 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 };
|
|
31179
31187
|
//# sourceMappingURL=index.js.map
|