es-toolkit 1.24.0-dev.783 → 1.24.0-dev.785

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.
@@ -8,9 +8,9 @@ const unary = require('../_chunk/unary-CMvKXy.js');
8
8
  const noop = require('../_chunk/noop-2IwLUk.js');
9
9
  const sumBy = require('../_chunk/sumBy-BkErWJ.js');
10
10
  const randomInt = require('../_chunk/randomInt-CF7bZK.js');
11
- const toMerged = require('../_chunk/toMerged-Bq5j0V.js');
12
- const isPlainObject$1 = require('../_chunk/isPlainObject-DOleKH.js');
13
- const isWeakSet$1 = require('../_chunk/isWeakSet-B8RBLD.js');
11
+ const toMerged = require('../_chunk/toMerged-B5ZVux.js');
12
+ const isPlainObject$1 = require('../_chunk/isPlainObject-octpoD.js');
13
+ const isWeakSet$1 = require('../_chunk/isWeakSet-BuFfzX.js');
14
14
  const upperFirst = require('../_chunk/upperFirst-BUECmK.js');
15
15
 
16
16
  function castArray(value) {
@@ -1702,7 +1702,7 @@ function mergeWithDeep(target, source, merge, stack) {
1702
1702
  source[i] = source[i] ?? undefined;
1703
1703
  }
1704
1704
  }
1705
- const sourceKeys = [...Object.keys(source), ...isWeakSet$1.getSymbols(source)];
1705
+ const sourceKeys = [...Object.keys(source), ...isPlainObject$1.getSymbols(source)];
1706
1706
  for (let i = 0; i < sourceKeys.length; i++) {
1707
1707
  const key = sourceKeys[i];
1708
1708
  let sourceValue = source[key];
@@ -1875,6 +1875,9 @@ function pick(obj, ...keysArr) {
1875
1875
  }
1876
1876
  for (const key of keys) {
1877
1877
  const value = get(obj, key);
1878
+ if (value === undefined && !has(obj, key)) {
1879
+ continue;
1880
+ }
1878
1881
  if (typeof key === 'string' && Object.hasOwn(obj, key)) {
1879
1882
  result[key] = value;
1880
1883
  }
@@ -1,4 +1,5 @@
1
1
  import { get } from './get.mjs';
2
+ import { has } from './has.mjs';
2
3
  import { set } from './set.mjs';
3
4
  import { isNil } from '../predicate/isNil.mjs';
4
5
 
@@ -25,6 +26,9 @@ function pick(obj, ...keysArr) {
25
26
  }
26
27
  for (const key of keys) {
27
28
  const value = get(obj, key);
29
+ if (value === undefined && !has(obj, key)) {
30
+ continue;
31
+ }
28
32
  if (typeof key === 'string' && Object.hasOwn(obj, key)) {
29
33
  result[key] = value;
30
34
  }
package/dist/index.js CHANGED
@@ -11,11 +11,11 @@ const noop = require('./_chunk/noop-2IwLUk.js');
11
11
  const sumBy = require('./_chunk/sumBy-BkErWJ.js');
12
12
  const randomInt = require('./_chunk/randomInt-CF7bZK.js');
13
13
  const math_index = require('./math/index.js');
14
- const toMerged = require('./_chunk/toMerged-Bq5j0V.js');
14
+ const toMerged = require('./_chunk/toMerged-B5ZVux.js');
15
15
  const object_index = require('./object/index.js');
16
- const isWeakSet = require('./_chunk/isWeakSet-B8RBLD.js');
16
+ const isWeakSet = require('./_chunk/isWeakSet-BuFfzX.js');
17
17
  const predicate_index = require('./predicate/index.js');
18
- const isPlainObject = require('./_chunk/isPlainObject-DOleKH.js');
18
+ const isPlainObject = require('./_chunk/isPlainObject-octpoD.js');
19
19
  const upperFirst = require('./_chunk/upperFirst-BUECmK.js');
20
20
  const string_index = require('./string/index.js');
21
21
 
@@ -1,3 +1,4 @@
1
+ import { getSymbols } from '../compat/_internal/getSymbols.mjs';
1
2
  import { isPrimitive } from '../predicate/isPrimitive.mjs';
2
3
  import { isTypedArray } from '../predicate/isTypedArray.mjs';
3
4
 
@@ -100,13 +101,10 @@ function cloneDeepImpl(obj, stack = new Map()) {
100
101
  return obj;
101
102
  }
102
103
  function copyProperties(target, source, stack) {
103
- const keys = Object.keys(source);
104
+ const keys = [...Object.keys(source), ...getSymbols(source)];
104
105
  for (let i = 0; i < keys.length; i++) {
105
106
  const key = keys[i];
106
- const descriptor = Object.getOwnPropertyDescriptor(source, key);
107
- if (descriptor?.writable || descriptor?.set) {
108
- target[key] = cloneDeepImpl(source[key], stack);
109
- }
107
+ target[key] = cloneDeepImpl(source[key], stack);
110
108
  }
111
109
  }
112
110
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const toMerged = require('../_chunk/toMerged-Bq5j0V.js');
5
+ const toMerged = require('../_chunk/toMerged-B5ZVux.js');
6
6
 
7
7
  function mergeWith(target, source, merge) {
8
8
  const sourceKeys = Object.keys(source);
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const isWeakSet = require('../_chunk/isWeakSet-B8RBLD.js');
6
- const isPlainObject = require('../_chunk/isPlainObject-DOleKH.js');
5
+ const isWeakSet = require('../_chunk/isWeakSet-BuFfzX.js');
6
+ const isPlainObject = require('../_chunk/isPlainObject-octpoD.js');
7
7
 
8
8
  function isBoolean(x) {
9
9
  return typeof x === 'boolean';
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.24.0-dev.783+61f5f880",
4
+ "version": "1.24.0-dev.785+28f0eaeb",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {