@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
package/dist/cjs/index.js
CHANGED
|
@@ -259,6 +259,9 @@ const ensureDirectory = (path) => {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
const getDirectoryPath = (filePath) => path__default["default"].dirname(filePath);
|
|
262
|
+
const createDayPath = (d, separator = "/") => `${d.getFullYear()}${separator}${(d.getMonth() + 1)
|
|
263
|
+
.toString()
|
|
264
|
+
.padStart(2, "0")}${separator}${d.getDate().toString().padStart(2, "0")}`;
|
|
262
265
|
|
|
263
266
|
const trimStart = (str, value) => str.startsWith(value) ? str.substring(value.length) : str;
|
|
264
267
|
const trimEnd = (str, value) => str.endsWith(value) ? str.substring(0, str.length - value.length) : str;
|
|
@@ -28669,6 +28672,7 @@ exports.byField = byField;
|
|
|
28669
28672
|
exports.byFieldDesc = byFieldDesc;
|
|
28670
28673
|
exports.camelToKebabCase = camelToKebabCase;
|
|
28671
28674
|
exports.camelToSnakeCase = camelToSnakeCase;
|
|
28675
|
+
exports.createDayPath = createDayPath;
|
|
28672
28676
|
exports.csvBuild = csvBuild;
|
|
28673
28677
|
exports.csvParse = csvParse;
|
|
28674
28678
|
exports.distinct = distinct;
|