@adobe/spacecat-shared-utils 1.25.0 → 1.25.1
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/functions.js +15 -5
- package/src/index.js +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.25.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.25.0...@adobe/spacecat-shared-utils-v1.25.1) (2024-12-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* types & deps ([#510](https://github.com/adobe/spacecat-shared/issues/510)) ([d162c1d](https://github.com/adobe/spacecat-shared/commit/d162c1d75a2052fc07da844923762e9397016b90))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-utils-v1.25.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.24.1...@adobe/spacecat-shared-utils-v1.25.0) (2024-12-23)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/functions.js
CHANGED
|
@@ -24,6 +24,15 @@ function isArray(value) {
|
|
|
24
24
|
return Array.isArray(value);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Determines whether the given value is a non-empty array (length greater than zero).
|
|
29
|
+
* @param {*} value - The value to check.
|
|
30
|
+
* @return {boolean} True if the value is a non-empty array, false otherwise.
|
|
31
|
+
*/
|
|
32
|
+
function isNonEmptyArray(value) {
|
|
33
|
+
return isArray(value) && value.length > 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
/**
|
|
28
37
|
* Determines case-insensitively if the given value is a boolean or a string
|
|
29
38
|
* representation of a boolean.
|
|
@@ -233,19 +242,20 @@ function dateAfterDays(days, dateString) {
|
|
|
233
242
|
|
|
234
243
|
export {
|
|
235
244
|
arrayEquals,
|
|
245
|
+
dateAfterDays,
|
|
246
|
+
deepEqual,
|
|
236
247
|
hasText,
|
|
237
248
|
isArray,
|
|
238
249
|
isBoolean,
|
|
239
250
|
isInteger,
|
|
240
|
-
isValidDate,
|
|
241
251
|
isIsoDate,
|
|
242
252
|
isIsoTimeOffsetsDate,
|
|
253
|
+
isNonEmptyArray,
|
|
254
|
+
isNonEmptyObject,
|
|
243
255
|
isNumber,
|
|
244
256
|
isObject,
|
|
245
|
-
isNonEmptyObject,
|
|
246
257
|
isString,
|
|
247
|
-
|
|
258
|
+
isValidDate,
|
|
248
259
|
isValidUrl,
|
|
249
|
-
|
|
250
|
-
deepEqual,
|
|
260
|
+
toBoolean,
|
|
251
261
|
};
|
package/src/index.js
CHANGED
|
@@ -12,21 +12,22 @@
|
|
|
12
12
|
|
|
13
13
|
export {
|
|
14
14
|
arrayEquals,
|
|
15
|
+
dateAfterDays,
|
|
16
|
+
deepEqual,
|
|
15
17
|
hasText,
|
|
16
18
|
isArray,
|
|
17
19
|
isBoolean,
|
|
18
20
|
isInteger,
|
|
19
|
-
isValidDate,
|
|
20
21
|
isIsoDate,
|
|
21
22
|
isIsoTimeOffsetsDate,
|
|
23
|
+
isNonEmptyArray,
|
|
24
|
+
isNonEmptyObject,
|
|
22
25
|
isNumber,
|
|
23
26
|
isObject,
|
|
24
|
-
isNonEmptyObject,
|
|
25
27
|
isString,
|
|
26
|
-
|
|
28
|
+
isValidDate,
|
|
27
29
|
isValidUrl,
|
|
28
|
-
|
|
29
|
-
deepEqual,
|
|
30
|
+
toBoolean,
|
|
30
31
|
} from './functions.js';
|
|
31
32
|
|
|
32
33
|
export {
|