@thi.ng/checks 3.6.18 → 3.6.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-01-04T21:07:38Z
3
+ - **Last updated**: 2025-01-14T12:23:33Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.6.19](https://github.com/thi-ng/umbrella/tree/@thi.ng/checks@3.6.19) (2025-01-14)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - use optional chaining & nullish coalescing ([c5a0a13](https://github.com/thi-ng/umbrella/commit/c5a0a13))
17
+
12
18
  ## [3.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/checks@3.6.0) (2024-04-08)
13
19
 
14
20
  #### 🚀 Features
package/has-max-length.js CHANGED
@@ -1,4 +1,4 @@
1
- const hasMaxLength = (len, x) => x != null && x.length <= len;
1
+ const hasMaxLength = (len, x) => x?.length <= len;
2
2
  export {
3
3
  hasMaxLength
4
4
  };
package/has-min-length.js CHANGED
@@ -1,4 +1,4 @@
1
- const hasMinLength = (len, x) => x != null && x.length >= len;
1
+ const hasMinLength = (len, x) => x?.length >= len;
2
2
  export {
3
3
  hasMinLength
4
4
  };
@@ -1,4 +1,4 @@
1
- const implementsFunction = (x, fn) => x != null && typeof x[fn] === "function";
1
+ const implementsFunction = (x, fn) => typeof x?.[fn] === "function";
2
2
  export {
3
3
  implementsFunction
4
4
  };
@@ -1,4 +1,4 @@
1
- const isAsyncIterable = (x) => x != null && typeof x[Symbol.asyncIterator] === "function";
1
+ const isAsyncIterable = (x) => typeof x?.[Symbol.asyncIterator] === "function";
2
2
  export {
3
3
  isAsyncIterable
4
4
  };
package/is-iterable.js CHANGED
@@ -1,4 +1,4 @@
1
- const isIterable = (x) => x != null && typeof x[Symbol.iterator] === "function";
1
+ const isIterable = (x) => typeof x?.[Symbol.iterator] === "function";
2
2
  export {
3
3
  isIterable
4
4
  };
package/is-object.js CHANGED
@@ -1,4 +1,4 @@
1
- const isObject = (x) => x !== null && typeof x === "object";
1
+ const isObject = (x) => x != null && typeof x === "object";
2
2
  export {
3
3
  isObject
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/checks",
3
- "version": "3.6.18",
3
+ "version": "3.6.19",
4
4
  "description": "Collection of 70+ type, feature & value checks",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -292,5 +292,5 @@
292
292
  "thi.ng": {
293
293
  "alias": "ch"
294
294
  },
295
- "gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
295
+ "gitHead": "6542b842120bef47cc18d45a1b1db68307a7f04b\n"
296
296
  }