@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/shared-utils",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -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}`;
@@ -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[] | null | undefined, newArray: T[] | null | undefined) => 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[] | undefined) => T[] | undefined;
22
+ export declare const arrayNotEmpty: <T>(array?: T[]) => T[] | undefined;
@@ -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 | undefined) => T | undefined;
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
  */