es-toolkit 1.20.0-dev.659 → 1.21.0-dev.660

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,5 +1,18 @@
1
1
  # es-toolkit Changelog
2
2
 
3
+ ## Version v1.21.0
4
+
5
+ Released on September 25th, 2024.
6
+
7
+ - Added support for [constantCase](https://es-toolkit.slash.page/reference/string/constantCase.html) and [isError](https://es-toolkit.slash.page/reference/predicate/isError.html).
8
+ - Added compatibility functions for [pad](https://es-toolkit.slash.page/reference/compat/string/pad.html), [padStart](https://es-toolkit.slash.page/reference/compat/string/padStart.html), [padEnd](https://es-toolkit.slash.page/reference/compat/string/padEnd.html), [defer](https://es-toolkit.slash.page/reference/compat/function/defer.html), [isFinite](https://es-toolkit.slash.page/reference/compat/predicate/isFinite.html), [toNumber](https://es-toolkit.slash.page/reference/compat/math/toNumber.html), [toFinite](https://es-toolkit.slash.page/reference/compat/math/toFinite.html), and [toInteger](https://es-toolkit.slash.page/reference/compat/math/toInteger.html).
9
+ - Improved performance for [flatten](https://es-toolkit.slash.page/reference/array/flatten.html), [isNumber](https://es-toolkit.slash.page/reference/predicate/isNumber.html), [isString](https://es-toolkit.slash.page/reference/predicate/isString.html), [isSymbol](https://es-toolkit.slash.page/reference/predicate/isSymbol.html), [isRegExp](https://es-toolkit.slash.page/reference/predicate/isRegExp.html), and [isBoolean](https://es-toolkit.slash.page/reference/predicate/isBoolean.html).
10
+ - Fixed [compact](https://es-toolkit.slash.page/reference/array/compact.html) to correctly exclude `0n` as a falsey value.
11
+ - Fixed [pick](https://es-toolkit.slash.page/reference/object/pick.html) to not pick nonexistent keys from the original object.
12
+ - Fixed [omit](https://es-toolkit.slash.page/reference/object/omit.html) to accept readonly arrays.
13
+
14
+ This version includes contributions from @hyesungoh, @D-Sketon, @mass2527, @gweesin, @VVSOGI, @coding-honey, @seonghun0828, and @jsparkdev. Thank you for your valuable contributions!
15
+
3
16
  ## Version v1.20.0
4
17
 
5
18
  Released on September 20th, 2024.
@@ -17,7 +17,9 @@ function pick(obj, keys) {
17
17
  const result = {};
18
18
  for (let i = 0; i < keys.length; i++) {
19
19
  const key = keys[i];
20
- result[key] = obj[key];
20
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
21
+ result[key] = obj[key];
22
+ }
21
23
  }
22
24
  return result;
23
25
  }
@@ -2,7 +2,9 @@ function pick(obj, keys) {
2
2
  const result = {};
3
3
  for (let i = 0; i < keys.length; i++) {
4
4
  const key = keys[i];
5
- result[key] = obj[key];
5
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
6
+ result[key] = obj[key];
7
+ }
6
8
  }
7
9
  return result;
8
10
  }
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.20.0-dev.659+75c41ef9",
4
+ "version": "1.21.0-dev.660+d2164703",
5
5
  "homepage": "https://es-toolkit.slash.page",
6
6
  "bugs": "https://github.com/toss/es-toolkit/issues",
7
7
  "repository": {