es-toolkit 1.22.0-dev.691 → 1.22.0-dev.693

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.
@@ -169,6 +169,10 @@ function property(path) {
169
169
  };
170
170
  }
171
171
 
172
+ function isObject(value) {
173
+ return value !== null && (typeof value === 'object' || typeof value === 'function');
174
+ }
175
+
172
176
  function isMatch(target, source) {
173
177
  if (source === target) {
174
178
  return true;
@@ -215,6 +219,9 @@ function isMatch(target, source) {
215
219
  return false;
216
220
  }
217
221
  default: {
222
+ if (!isObject(target)) {
223
+ return target === source || (Number.isNaN(target) && Number.isNaN(source));
224
+ }
218
225
  return !source;
219
226
  }
220
227
  }
@@ -1390,10 +1397,6 @@ function fromPairs(pairs) {
1390
1397
  return result;
1391
1398
  }
1392
1399
 
1393
- function isObject(value) {
1394
- return value !== null && (typeof value === 'object' || typeof value === 'function');
1395
- }
1396
-
1397
1400
  function isBoolean(value) {
1398
1401
  return typeof value === 'boolean' || value instanceof Boolean;
1399
1402
  }
@@ -1,4 +1,5 @@
1
1
  import { isPrimitive } from '../../predicate/isPrimitive.mjs';
2
+ import { isObject } from './isObject.mjs';
2
3
 
3
4
  function isMatch(target, source) {
4
5
  if (source === target) {
@@ -46,6 +47,9 @@ function isMatch(target, source) {
46
47
  return false;
47
48
  }
48
49
  default: {
50
+ if (!isObject(target)) {
51
+ return target === source || (Number.isNaN(target) && Number.isNaN(source));
52
+ }
49
53
  return !source;
50
54
  }
51
55
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
3
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
4
- "version": "1.22.0-dev.691+6fa1f00e",
4
+ "version": "1.22.0-dev.693+ac1e79e0",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {