@trackunit/shared-utils 0.0.56 → 0.0.57
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 +6 -1
- package/index.esm.d.ts +1 -0
- package/index.esm.js +6 -1
- package/package.json +1 -1
- package/src/DateTimeFormat.d.ts +4 -4
- package/src/arrayUtils.d.ts +2 -2
- package/src/objectUtils.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -697,7 +697,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
697
697
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
698
698
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
699
699
|
});
|
|
700
|
-
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
703
|
+
var e = new Error(message);
|
|
704
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
705
|
+
};
|
|
701
706
|
|
|
702
707
|
const dataURItoBlob = (dataURI) => {
|
|
703
708
|
var _a, _b, _c, _d, _e;
|
package/index.esm.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/index.esm.js
CHANGED
|
@@ -693,7 +693,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
693
693
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
694
694
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
695
695
|
});
|
|
696
|
-
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
699
|
+
var e = new Error(message);
|
|
700
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
701
|
+
};
|
|
697
702
|
|
|
698
703
|
const dataURItoBlob = (dataURI) => {
|
|
699
704
|
var _a, _b, _c, _d, _e;
|
package/package.json
CHANGED
package/src/DateTimeFormat.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare enum HoursAndMinutesFormat {
|
|
2
|
-
HOURS_MIN_SEC_LONG = "HOURS_MIN_SEC_LONG"
|
|
3
|
-
HOURS_MIN_SEC = "HOURS_MIN_SEC"
|
|
4
|
-
HOURS_MIN_LONG = "HOURS_MIN_LONG"
|
|
5
|
-
HOURS_MIN = "HOURS_MIN"
|
|
2
|
+
HOURS_MIN_SEC_LONG = "HOURS_MIN_SEC_LONG",// h [h] mm [min] ss [sec]
|
|
3
|
+
HOURS_MIN_SEC = "HOURS_MIN_SEC",// h[h] m[m] s[s]
|
|
4
|
+
HOURS_MIN_LONG = "HOURS_MIN_LONG",// h [hrs] mm [min]
|
|
5
|
+
HOURS_MIN = "HOURS_MIN",// h[h] m[m]
|
|
6
6
|
HOURS_LONG = "HOURS_LONG"
|
|
7
7
|
}
|
|
8
8
|
export type HoursAndMinutesFormatType = `${HoursAndMinutesFormat}`;
|
package/src/arrayUtils.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function ensureArray<T>(arrayish: T | T[]): T[];
|
|
|
10
10
|
* @param newArray The new array of items to merge with the previous array
|
|
11
11
|
* @returns A new array with the items from the previous array and the new array, but only if the item's key is unique.
|
|
12
12
|
*/
|
|
13
|
-
export declare const unionArraysByKey: <T extends object>(key: keyof T, previous: T[] |
|
|
13
|
+
export declare const unionArraysByKey: <T extends object>(key: keyof T, previous: T[] | undefined | null, newArray: T[] | undefined | null) => T[];
|
|
14
14
|
/** Ensures if an array is equal to another array */
|
|
15
15
|
export declare const isStringArrayEqual: (first?: string[], second?: string[]) => boolean;
|
|
16
16
|
/**
|
|
@@ -19,4 +19,4 @@ export declare const isStringArrayEqual: (first?: string[], second?: string[]) =
|
|
|
19
19
|
* @param array - The array to check.
|
|
20
20
|
* @returns The array if not empty, otherwise undefined.
|
|
21
21
|
*/
|
|
22
|
-
export declare const arrayNotEmpty: <T>(array?: T[]
|
|
22
|
+
export declare const arrayNotEmpty: <T>(array?: T[]) => T[] | undefined;
|
package/src/objectUtils.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const deleteUndefinedKeys: <T extends Record<string, unknown>>(ob
|
|
|
12
12
|
* @param obj - The object to check.
|
|
13
13
|
* @returns The object if not empty, otherwise undefined.
|
|
14
14
|
*/
|
|
15
|
-
export declare const objNotEmpty: <T extends object>(obj?: T
|
|
15
|
+
export declare const objNotEmpty: <T extends object>(obj?: T) => T | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Picks the given keys from an object, typesafe.
|
|
18
18
|
*/
|