@trackunit/shared-utils 0.0.41 → 0.0.43
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/index.cjs.js +0 -11
- package/index.esm.js +1 -11
- package/package.json +1 -1
- package/src/typeUtils.d.ts +0 -7
package/index.cjs.js
CHANGED
|
@@ -228,16 +228,6 @@ const nonNullable = (value) => {
|
|
|
228
228
|
const truthy = (value) => {
|
|
229
229
|
return !!value;
|
|
230
230
|
};
|
|
231
|
-
/**
|
|
232
|
-
* Converts a string value to lowercase while preserving the original type.
|
|
233
|
-
*
|
|
234
|
-
* @param value - The string value to convert to lowercase.
|
|
235
|
-
* @returns {Lowercase<string> } The lowercase value with the same type as the input value.
|
|
236
|
-
*/
|
|
237
|
-
const typeSafeToLowercase = (value) => {
|
|
238
|
-
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
239
|
-
return value.toLowerCase();
|
|
240
|
-
};
|
|
241
231
|
|
|
242
232
|
/** toggle whether a value is in an array or not */
|
|
243
233
|
function toggle(array, value) {
|
|
@@ -1040,5 +1030,4 @@ exports.toggle = toggle;
|
|
|
1040
1030
|
exports.trimIds = trimIds;
|
|
1041
1031
|
exports.trimPath = trimPath;
|
|
1042
1032
|
exports.truthy = truthy;
|
|
1043
|
-
exports.typeSafeToLowercase = typeSafeToLowercase;
|
|
1044
1033
|
exports.unionArraysByKey = unionArraysByKey;
|
package/index.esm.js
CHANGED
|
@@ -224,16 +224,6 @@ const nonNullable = (value) => {
|
|
|
224
224
|
const truthy = (value) => {
|
|
225
225
|
return !!value;
|
|
226
226
|
};
|
|
227
|
-
/**
|
|
228
|
-
* Converts a string value to lowercase while preserving the original type.
|
|
229
|
-
*
|
|
230
|
-
* @param value - The string value to convert to lowercase.
|
|
231
|
-
* @returns {Lowercase<string> } The lowercase value with the same type as the input value.
|
|
232
|
-
*/
|
|
233
|
-
const typeSafeToLowercase = (value) => {
|
|
234
|
-
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
235
|
-
return value.toLowerCase();
|
|
236
|
-
};
|
|
237
227
|
|
|
238
228
|
/** toggle whether a value is in an array or not */
|
|
239
229
|
function toggle(array, value) {
|
|
@@ -981,4 +971,4 @@ const titleCase = (s) => {
|
|
|
981
971
|
*/
|
|
982
972
|
const removeLeftPadding = (id) => Number(id === null || id === void 0 ? void 0 : id.replace(/-/g, "").replace(/^0+/, ""));
|
|
983
973
|
|
|
984
|
-
export { DateTimeFormat, HoursAndMinutesFormat, align, arrayLengthCompare, arrayNotEmpty, booleanCompare, capitalize, convertBlobToBase64, convertMetersToYards, convertYardsToMeters, dateCompare, deleteUndefinedKeys, difference, doNothing, ensureArray, enumFromValue, enumFromValueTypesafe, enumOrUndefinedFromValue, exhaustiveCheck, filterByMultiple, formatAddress, formatCoordinates, fuzzySearch, getDifferenceBetweenDates, getEndOfDay, getISOStringFromDate, getMultipleCoordinatesFromGeoJsonObject, getPointCoordinateFromGeoJsonObject, getResizedDimensions, getStartOfDay, groupBy, groupTinyDataToOthers, hourIntervals, intersection, isStringArrayEqual, isUUID, isValidImage, nonNullable, numberCompare, numberCompareUnknownAfterHighest, objNotEmpty, pick, removeLeftPadding, resizeBlob, resizeImage, size, stringCompare, stringCompareFromKey, stringNaturalCompare, titleCase, toID, toIDs, toUUID, toggle, trimIds, trimPath, truthy,
|
|
974
|
+
export { DateTimeFormat, HoursAndMinutesFormat, align, arrayLengthCompare, arrayNotEmpty, booleanCompare, capitalize, convertBlobToBase64, convertMetersToYards, convertYardsToMeters, dateCompare, deleteUndefinedKeys, difference, doNothing, ensureArray, enumFromValue, enumFromValueTypesafe, enumOrUndefinedFromValue, exhaustiveCheck, filterByMultiple, formatAddress, formatCoordinates, fuzzySearch, getDifferenceBetweenDates, getEndOfDay, getISOStringFromDate, getMultipleCoordinatesFromGeoJsonObject, getPointCoordinateFromGeoJsonObject, getResizedDimensions, getStartOfDay, groupBy, groupTinyDataToOthers, hourIntervals, intersection, isStringArrayEqual, isUUID, isValidImage, nonNullable, numberCompare, numberCompareUnknownAfterHighest, objNotEmpty, pick, removeLeftPadding, resizeBlob, resizeImage, size, stringCompare, stringCompareFromKey, stringNaturalCompare, titleCase, toID, toIDs, toUUID, toggle, trimIds, trimPath, truthy, unionArraysByKey };
|
package/package.json
CHANGED
package/src/typeUtils.d.ts
CHANGED
|
@@ -52,11 +52,4 @@ export type MappedOmit<T, K extends keyof T> = {
|
|
|
52
52
|
* @returns {Omit<BaseType, OptionalProp> & Partial<Pick<BaseType, OptionalProp>>} - A type with the specified property made optional.
|
|
53
53
|
*/
|
|
54
54
|
export type MakePropertyOptional<BaseType, OptionalProp extends keyof BaseType> = MappedOmit<BaseType, OptionalProp> & Partial<Pick<BaseType, OptionalProp>>;
|
|
55
|
-
/**
|
|
56
|
-
* Converts a string value to lowercase while preserving the original type.
|
|
57
|
-
*
|
|
58
|
-
* @param value - The string value to convert to lowercase.
|
|
59
|
-
* @returns {Lowercase<string> } The lowercase value with the same type as the input value.
|
|
60
|
-
*/
|
|
61
|
-
export declare const typeSafeToLowercase: <TStringLiteral extends string>(value: TStringLiteral) => Lowercase<TStringLiteral>;
|
|
62
55
|
export {};
|