@trackunit/shared-utils 1.5.23 → 1.5.27

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
@@ -60,7 +60,7 @@ const truthy = (value) => {
60
60
  * @template TObject - The type of the object.
61
61
  */
62
62
  const objectEntries = (object) =>
63
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-entries
63
+ // eslint-disable-next-line local-rules/no-typescript-assertion
64
64
  Object.entries(object);
65
65
  /**
66
66
  * Converts an array of key-value pairs into an object.
@@ -70,7 +70,7 @@ Object.entries(object);
70
70
  * @template TEntries - The type of the entries array.
71
71
  */
72
72
  const objectFromEntries = (entries) => {
73
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-from-entries
73
+ // eslint-disable-next-line local-rules/no-typescript-assertion
74
74
  return Object.fromEntries(entries);
75
75
  };
76
76
  /**
@@ -87,7 +87,7 @@ const objectFromEntries = (entries) => {
87
87
  * @returns {(keyof TObject)[]} An array of the keys of the object.
88
88
  */
89
89
  const objectKeys = (object) => {
90
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-keys
90
+ // eslint-disable-next-line local-rules/no-typescript-assertion
91
91
  return Object.keys(object).map(key => key);
92
92
  };
93
93
  /**
@@ -102,7 +102,7 @@ const objectKeys = (object) => {
102
102
  * @returns {TObject[keyof TObject][]} An array of the values of the object.
103
103
  */
104
104
  const objectValues = (object) =>
105
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-values
105
+ // eslint-disable-next-line local-rules/no-typescript-assertion
106
106
  Object.values(object);
107
107
 
108
108
  /**
@@ -494,9 +494,7 @@ const insertToUUID = (arr, position, value) => [
494
494
  * @param input A string.
495
495
  * @param maxLength The maximum length of the string that it should pad for.
496
496
  */
497
- const zeroPadToUUIDLength = (input, maxLength) =>
498
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
499
- input.length < maxLength ? zeroPadToUUIDLength("0" + input, maxLength) : input;
497
+ const zeroPadToUUIDLength = (input, maxLength) => input.length < maxLength ? zeroPadToUUIDLength("0" + input, maxLength) : input;
500
498
  /**
501
499
  * A helper function that converts any value into a UUID.
502
500
  *
@@ -1271,8 +1269,6 @@ const svgToPNG = async ({ base64EncodedSVG, maxWidth, maxHeight, idealArea, }) =
1271
1269
  return toPNG({ image, dimensions, maxHeight, maxWidth, idealArea });
1272
1270
  };
1273
1271
 
1274
- /* eslint-disable local-rules/prefer-custom-object-keys */
1275
- /* eslint-disable local-rules/prefer-custom-object-from-entries */
1276
1272
  /**
1277
1273
  * Sorts the given object alphabetically, caseFirst: "lower".
1278
1274
  */
package/index.esm.js CHANGED
@@ -58,7 +58,7 @@ const truthy = (value) => {
58
58
  * @template TObject - The type of the object.
59
59
  */
60
60
  const objectEntries = (object) =>
61
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-entries
61
+ // eslint-disable-next-line local-rules/no-typescript-assertion
62
62
  Object.entries(object);
63
63
  /**
64
64
  * Converts an array of key-value pairs into an object.
@@ -68,7 +68,7 @@ Object.entries(object);
68
68
  * @template TEntries - The type of the entries array.
69
69
  */
70
70
  const objectFromEntries = (entries) => {
71
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-from-entries
71
+ // eslint-disable-next-line local-rules/no-typescript-assertion
72
72
  return Object.fromEntries(entries);
73
73
  };
74
74
  /**
@@ -85,7 +85,7 @@ const objectFromEntries = (entries) => {
85
85
  * @returns {(keyof TObject)[]} An array of the keys of the object.
86
86
  */
87
87
  const objectKeys = (object) => {
88
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-keys
88
+ // eslint-disable-next-line local-rules/no-typescript-assertion
89
89
  return Object.keys(object).map(key => key);
90
90
  };
91
91
  /**
@@ -100,7 +100,7 @@ const objectKeys = (object) => {
100
100
  * @returns {TObject[keyof TObject][]} An array of the values of the object.
101
101
  */
102
102
  const objectValues = (object) =>
103
- // eslint-disable-next-line local-rules/no-typescript-assertion, local-rules/prefer-custom-object-values
103
+ // eslint-disable-next-line local-rules/no-typescript-assertion
104
104
  Object.values(object);
105
105
 
106
106
  /**
@@ -492,9 +492,7 @@ const insertToUUID = (arr, position, value) => [
492
492
  * @param input A string.
493
493
  * @param maxLength The maximum length of the string that it should pad for.
494
494
  */
495
- const zeroPadToUUIDLength = (input, maxLength) =>
496
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
497
- input.length < maxLength ? zeroPadToUUIDLength("0" + input, maxLength) : input;
495
+ const zeroPadToUUIDLength = (input, maxLength) => input.length < maxLength ? zeroPadToUUIDLength("0" + input, maxLength) : input;
498
496
  /**
499
497
  * A helper function that converts any value into a UUID.
500
498
  *
@@ -1269,8 +1267,6 @@ const svgToPNG = async ({ base64EncodedSVG, maxWidth, maxHeight, idealArea, }) =
1269
1267
  return toPNG({ image, dimensions, maxHeight, maxWidth, idealArea });
1270
1268
  };
1271
1269
 
1272
- /* eslint-disable local-rules/prefer-custom-object-keys */
1273
- /* eslint-disable local-rules/prefer-custom-object-from-entries */
1274
1270
  /**
1275
1271
  * Sorts the given object alphabetically, caseFirst: "lower".
1276
1272
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/shared-utils",
3
- "version": "1.5.23",
3
+ "version": "1.5.27",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "engines": {
6
6
  "node": ">=20.x"