@cellaware/utils 8.6.22 → 8.6.23

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/dist/util.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare function isArrayLike(obj: any): boolean;
10
10
  /**
11
11
  * Default `idx` is 100.
12
12
  */
13
- export declare function truncateValue(value: string, idx?: number): string;
13
+ export declare function truncateValue(value: any, idx?: number): any;
14
14
  /**
15
15
  * Default `idx` is 100.
16
16
  */
package/dist/util.js CHANGED
@@ -21,6 +21,9 @@ export function isArrayLike(obj) {
21
21
  * Default `idx` is 100.
22
22
  */
23
23
  export function truncateValue(value, idx) {
24
+ if (!value || typeof value !== 'string') {
25
+ return value;
26
+ }
24
27
  let truncValue = truncateValuePreserveNewLines(value, idx);
25
28
  if (truncValue.includes('\n')) {
26
29
  truncValue = value.slice(0, truncValue.indexOf('\n')) + '...';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "8.6.22",
3
+ "version": "8.6.23",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",