@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.
|
@@ -5,3 +5,5 @@ export declare const camelToSnakeCase: (str: string) => string;
|
|
|
5
5
|
export declare const camelToKebabCase: (str: string) => string;
|
|
6
6
|
export declare const toCamelCase: (str: string) => string;
|
|
7
7
|
export declare const toTitleCase: (str: string) => string;
|
|
8
|
+
export declare const ensureTailingSlash: (value: string) => string;
|
|
9
|
+
export declare const ensureStartSlash: (value: string) => string;
|
package/dist/esm/index.js
CHANGED
|
@@ -259,6 +259,8 @@ const camelToSnakeCase = (str) => trimStart(str.replace(/[A-Z]/g, (letter) => `_
|
|
|
259
259
|
const camelToKebabCase = (str) => trimStart(str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`), "-");
|
|
260
260
|
const toCamelCase = (str) => `${str[0].toLowerCase()}${str.slice(1)}`;
|
|
261
261
|
const toTitleCase = (str) => `${str[0].toUpperCase()}${str.slice(1)}`;
|
|
262
|
+
const ensureTailingSlash = (value) => value?.endsWith("/") ? value : value + "/";
|
|
263
|
+
const ensureStartSlash = (value) => value?.startsWith("/") ? value : "/" + value;
|
|
262
264
|
|
|
263
265
|
const removeUndefinedProps = (obj, options = { recursive: false }) => {
|
|
264
266
|
const { recursive } = options;
|
|
@@ -28313,5 +28315,5 @@ const excelParse = (file, options) => {
|
|
|
28313
28315
|
.map((x) => aggregateRow(header, x, options));
|
|
28314
28316
|
};
|
|
28315
28317
|
|
|
28316
|
-
export { ExcelKeyTransform, Log, LogLevel, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, csvBuild, csvParseRaw, distinct, distinctElements, ensureDirectory, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, last, newUuid, notNull, notUndefined, pluralize, range, removeUndefinedProps, selectMany, sleep, sort, splitPath, toCamelCase, toDict, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart };
|
|
28318
|
+
export { ExcelKeyTransform, Log, LogLevel, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, csvBuild, csvParseRaw, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, last, newUuid, notNull, notUndefined, pluralize, range, removeUndefinedProps, selectMany, sleep, sort, splitPath, toCamelCase, toDict, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart };
|
|
28317
28319
|
//# sourceMappingURL=index.js.map
|