es-toolkit 1.43.0-dev.1716 → 1.43.0-dev.1718

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.
@@ -4,9 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  function intersection(firstArr, secondArr) {
6
6
  const secondSet = new Set(secondArr);
7
- return firstArr.filter(item => {
8
- return secondSet.has(item);
9
- });
7
+ return firstArr.filter(item => secondSet.has(item));
10
8
  }
11
9
 
12
10
  exports.intersection = intersection;
@@ -1,8 +1,6 @@
1
1
  function intersection(firstArr, secondArr) {
2
2
  const secondSet = new Set(secondArr);
3
- return firstArr.filter(item => {
4
- return secondSet.has(item);
5
- });
3
+ return firstArr.filter(item => secondSet.has(item));
6
4
  }
7
5
 
8
6
  export { intersection };
@@ -8,37 +8,37 @@
8
8
  * @example
9
9
  * // Clone a primitive values
10
10
  * const num = 29;
11
- * const clonedNum = clone(num);
11
+ * const clonedNum = cloneDeep(num);
12
12
  * console.log(clonedNum); // 29
13
13
  * console.log(clonedNum === num); // true
14
14
  *
15
15
  * @example
16
16
  * // Clone an array
17
17
  * const arr = [1, 2, 3];
18
- * const clonedArr = clone(arr);
18
+ * const clonedArr = cloneDeep(arr);
19
19
  * console.log(clonedArr); // [1, 2, 3]
20
20
  * console.log(clonedArr === arr); // false
21
21
  *
22
22
  * @example
23
23
  * // Clone an array with nested objects
24
24
  * const arr = [1, { a: 1 }, [1, 2, 3]];
25
- * const clonedArr = clone(arr);
25
+ * const clonedArr = cloneDeep(arr);
26
26
  * arr[1].a = 2;
27
- * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]
27
+ * console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
28
28
  * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
29
29
  * console.log(clonedArr === arr); // false
30
30
  *
31
31
  * @example
32
32
  * // Clone an object
33
33
  * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
34
- * const clonedObj = clone(obj);
34
+ * const clonedObj = cloneDeep(obj);
35
35
  * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
36
36
  * console.log(clonedObj === obj); // false
37
37
  *
38
38
  * @example
39
39
  * // Clone an object with nested objects
40
40
  * const obj = { a: 1, b: { c: 1 } };
41
- * const clonedObj = clone(obj);
41
+ * const clonedObj = cloneDeep(obj);
42
42
  * obj.b.c = 2;
43
43
  * console.log(obj); // { a: 1, b: { c: 2 } }
44
44
  * console.log(clonedObj); // { a: 1, b: { c: 1 } }
@@ -8,37 +8,37 @@
8
8
  * @example
9
9
  * // Clone a primitive values
10
10
  * const num = 29;
11
- * const clonedNum = clone(num);
11
+ * const clonedNum = cloneDeep(num);
12
12
  * console.log(clonedNum); // 29
13
13
  * console.log(clonedNum === num); // true
14
14
  *
15
15
  * @example
16
16
  * // Clone an array
17
17
  * const arr = [1, 2, 3];
18
- * const clonedArr = clone(arr);
18
+ * const clonedArr = cloneDeep(arr);
19
19
  * console.log(clonedArr); // [1, 2, 3]
20
20
  * console.log(clonedArr === arr); // false
21
21
  *
22
22
  * @example
23
23
  * // Clone an array with nested objects
24
24
  * const arr = [1, { a: 1 }, [1, 2, 3]];
25
- * const clonedArr = clone(arr);
25
+ * const clonedArr = cloneDeep(arr);
26
26
  * arr[1].a = 2;
27
- * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]
27
+ * console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
28
28
  * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
29
29
  * console.log(clonedArr === arr); // false
30
30
  *
31
31
  * @example
32
32
  * // Clone an object
33
33
  * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
34
- * const clonedObj = clone(obj);
34
+ * const clonedObj = cloneDeep(obj);
35
35
  * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
36
36
  * console.log(clonedObj === obj); // false
37
37
  *
38
38
  * @example
39
39
  * // Clone an object with nested objects
40
40
  * const obj = { a: 1, b: { c: 1 } };
41
- * const clonedObj = clone(obj);
41
+ * const clonedObj = cloneDeep(obj);
42
42
  * obj.b.c = 2;
43
43
  * console.log(obj); // { a: 1, b: { c: 2 } }
44
44
  * console.log(clonedObj); // { a: 1, b: { c: 1 } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "es-toolkit",
3
- "version": "1.43.0-dev.1716+9a9b24e3",
3
+ "version": "1.43.0-dev.1718+af81d8c2",
4
4
  "description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
5
5
  "homepage": "https://es-toolkit.dev",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",