@punks/backend-core 0.0.16 → 0.0.17
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
CHANGED
|
@@ -268,6 +268,8 @@ const camelToSnakeCase = (str) => trimStart(str.replace(/[A-Z]/g, (letter) => `_
|
|
|
268
268
|
const camelToKebabCase = (str) => trimStart(str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`), "-");
|
|
269
269
|
const toCamelCase = (str) => `${str[0].toLowerCase()}${str.slice(1)}`;
|
|
270
270
|
const toTitleCase = (str) => `${str[0].toUpperCase()}${str.slice(1)}`;
|
|
271
|
+
const ensureTailingSlash = (value) => value?.endsWith("/") ? value : value + "/";
|
|
272
|
+
const ensureStartSlash = (value) => value?.startsWith("/") ? value : "/" + value;
|
|
271
273
|
|
|
272
274
|
const removeUndefinedProps = (obj, options = { recursive: false }) => {
|
|
273
275
|
const { recursive } = options;
|
|
@@ -28332,6 +28334,8 @@ exports.csvParseRaw = csvParseRaw;
|
|
|
28332
28334
|
exports.distinct = distinct;
|
|
28333
28335
|
exports.distinctElements = distinctElements;
|
|
28334
28336
|
exports.ensureDirectory = ensureDirectory;
|
|
28337
|
+
exports.ensureStartSlash = ensureStartSlash;
|
|
28338
|
+
exports.ensureTailingSlash = ensureTailingSlash;
|
|
28335
28339
|
exports.excelBuild = excelBuild;
|
|
28336
28340
|
exports.excelParse = excelParse;
|
|
28337
28341
|
exports.first = first;
|