@punks/backend-core 0.0.57 → 0.0.59
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 +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/utils/index.d.ts +1 -1
- package/dist/cjs/types/utils/paths.d.ts +1 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/utils/index.d.ts +1 -1
- package/dist/esm/types/utils/paths.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ export * from "./array";
|
|
|
2
2
|
export { addTime, subtractTime, TimeUnit } from "./dates";
|
|
3
3
|
export { CsvColumnDefinition as ColumnDefinition, CsvBuildOptions, csvBuild, csvParse, } from "./csv";
|
|
4
4
|
export { getDirectoryFilePaths } from "./files";
|
|
5
|
-
export { joinPath, splitPath, ensureDirectory, getDirectoryPath } from "./paths";
|
|
5
|
+
export { joinPath, splitPath, ensureDirectory, getDirectoryPath, createDayPath, } from "./paths";
|
|
6
6
|
export * from "./strings";
|
|
7
7
|
export * from "./objects";
|
|
8
8
|
export * from "./text";
|
|
@@ -2,3 +2,4 @@ export declare const joinPath: (...paths: string[]) => string;
|
|
|
2
2
|
export declare const splitPath: (filePath: string) => string[];
|
|
3
3
|
export declare const ensureDirectory: (path: string) => void;
|
|
4
4
|
export declare const getDirectoryPath: (filePath: string) => string;
|
|
5
|
+
export declare const createDayPath: (d: Date, separator?: string) => string;
|
package/dist/esm/index.js
CHANGED
|
@@ -231,6 +231,9 @@ const ensureDirectory = (path) => {
|
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
233
|
const getDirectoryPath = (filePath) => path.dirname(filePath);
|
|
234
|
+
const createDayPath = (d, separator = "/") => `${d.getFullYear()}${separator}${(d.getMonth() + 1)
|
|
235
|
+
.toString()
|
|
236
|
+
.padStart(2, "0")}${separator}${d.getDate().toString().padStart(2, "0")}`;
|
|
234
237
|
|
|
235
238
|
const trimStart = (str, value) => str.startsWith(value) ? str.substring(value.length) : str;
|
|
236
239
|
const trimEnd = (str, value) => str.endsWith(value) ? str.substring(0, str.length - value.length) : str;
|
|
@@ -28631,5 +28634,5 @@ const processArrayItemMove = (items, input) => {
|
|
|
28631
28634
|
}));
|
|
28632
28635
|
};
|
|
28633
28636
|
|
|
28634
|
-
export { ConsoleLogger, DatadogLogger, ExcelKeyTransform, Log, LogLevel, MetaSerializationType, addTime, buildObject, buildTree, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, csvBuild, csvParse, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, groupBy, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart };
|
|
28637
|
+
export { ConsoleLogger, DatadogLogger, ExcelKeyTransform, Log, LogLevel, MetaSerializationType, addTime, buildObject, buildTree, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, createDayPath, csvBuild, csvParse, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, groupBy, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, jsonSerialize, last, logMemoryUsage, mapOrThrow, mergeDeep, newUuid, notNull, notUndefined, pluralize, processArrayDifferences, processArrayItemMove, range, removeUndefinedProps, selectMany, sleep, sort, splitPath, subArrays, subtractTime, toArrayDict, toCamelCase, toDict, toItemsDict, toItemsMap, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart };
|
|
28635
28638
|
//# sourceMappingURL=index.js.map
|