39 KiB
es-toolkit Changelog
Version v1.27.0
Released on November 10th, 2024.
- Added support for findKey and isSubsetWith.
- Introduced compatibility functions for words, at, differenceBy, uniqBy, forEach, each, sum, sumBy, union, zip, unzip, iteratee, isEmpty, and replace.
- Fixed a bug in cloneDeep that prevented it from correctly cloning object prototypes.
- Improved performance for at.
- Enhanced performance for toPath, get, set, unset, has, orderBy, chunk, difference, drop, dropRight, dropWhile, findLastIndex, head, last, sample, tail, take, and takeRight in our compatibility library.
We sincerely thank @scato3, @ssi02014, @filipsobol, @mass2527, @Gyumong, @D-Sketon, @dayongkr, @kyvg, @Na-hyunwoo, @kaehehehe, and @bhollis for their contributions. Special thanks to @cruelladevil for improving the documentation. We appreciate your great efforts!
Version v1.26.1
Released on October 25th, 2024.
- Fixed a bug in isMatch that did not strictly compare
null
in objects.
This version includes contributions from @D-Sketon. Thank you for your valuable contributions!
Version v1.26.0
Released on October 24th, 2024.
- Added support for invariant, identity, median, and medianBy.
- Added compatibility functions for template, uniqueId, intersectionBy, orderBy, sortBy, and some.
- Made it possible to use drop, dropRight, every, take, and takeRight directly as iteratees, allowing for usage like
arr.map(drop)
. - Corrected merge to disallow primitive values such as numbers or strings.
This version includes contributions from @dayongkr, @Na-hyunwoo, @ssi02014, @kaehehehe, @jakvbs, @D-Sketon, and @seonghun0828. Thank you for your valuable contributions!
Version v1.25.2
Released on October 16th, 2024.
- Fixed a problem with isJSONValue, isJSONArray, and isJSONObject that led to circular dependencies.
- Enhanced flatten, flattenDeep, flattenDepth, slice, and zipObjectDeep to work with array-like objects in our compatibility library, ensuring they are fully compatible with lodash.
This version includes contributions from @D-Sketon. Thank you for your valuable contributions!
Version v1.25.1
Released on October 15th, 2024.
- Resolved an issue in cloneDeep that incorrectly copied properties from the
target
when they were read-only. - Updated every, filter, find, findIndex, findLastIndex, indexOf, and join to now accept array-like objects and a
fromIndex
parameter, making them compatible with lodash.
This version includes contributions from @D-Sketon. Thank you for your valuable contributions!
Version v1.25.0
Released on October 14th, 2024.
- Added support for isFile.
- Added compatibility functions for escape, toSafeInteger, intersection, sample, chunk, compact, head, initial, last, tail, take, takeRight, uniq, and without.
- Enhanced performance for at and isPlainObject.
- Resolved an issue in cloneDeep that prevented it from cloning symbol properties and read-only properties of objects.
- Fixed a problem in pick within our compatibility library that incorrectly added
undefined
for keys that do not exist.
This version includes contributions from @D-Sketon, @mass2527, @dayongkr, @lukaszkowalik2, @Gyumong, @Dohun-choi, @belgattitude, and @chhw130. Thank you for your valuable contributions!
Version v1.24.0
Released on October 7th, 2024.
- Added support for isBlob and isDate.
- Added compatibility functions for invertBy, times, constant, slice, toLength, defaultTo, dropRightWhile, curryRight, rangeRight, before, eq, defaults, toDefaulted, isArrayBuffer, isSet, and isMap.
- Enhanced difference to work with Array-like objects, aligning its functionality with lodash's behavior.
- Improved performance for pickBy and omitBy.
Version v1.23.0
Released on October 1st, 2024.
- Added support for isEqualWith, isArrayBuffer, curryRight, isJSONValue, isJSONObject, isJSONArray.
- Fixed a bug in merge that copied the reference from the
source
object to thetarget
object. - Fixed a bug in includes that returned
true
for inherited properties. - Fixed a bug in startCase and other string methods that did not correctly split the words when using accented letters.
- Fixed a bug in filter that did not provide correct arguments to the predicate function.
- Fixed a bug in isMatch that did not strictly compare primitive falsy values.
This version includes contributions from @D-Sketon, @wojtekmaj, @mass2527, @chhw130, and @knott11. Thank you for your valuable contributions!
Version v1.22.0
Released on September 28th, 2024.
-
Added compatibility functions for filter, includes, every, flip, and dropWhile.
-
Fixed a bug in throttle that prevented it from throttling after the initial
throttleMs
. -
Fixed a bug in cloneDeep that caused it to not clone the offset and length of
DataView
. -
Fixed a bug in clone that threw an error if
SharedArrayBuffer
is unavailable.
This version includes contributions from @dayongkr, @k-jeonghee, @D-Sketon, @iDevGon, @mass2527, @wojtekmaj, @jonganebski, @hyesungoh, and @chhw130. Thank you for your valuable contributions!
Version v1.21.0
Released on September 25th, 2024.
- Added support for constantCase and isError.
- Added compatibility functions for pad, padStart, padEnd, defer, isFinite, toNumber, toFinite, and toInteger.
- Improved performance for flatten, isNumber, isString, isSymbol, isRegExp, and isBoolean.
- Fixed compact to correctly exclude
0n
as a falsey value. - Fixed pick to not pick nonexistent keys from the original object.
- Fixed omit to accept readonly arrays.
This version includes contributions from @hyesungoh, @D-Sketon, @mass2527, @gweesin, @VVSOGI, @coding-honey, @seonghun0828, and @jsparkdev. Thank you for your valuable contributions!
Version v1.20.0
Released on September 20th, 2024.
- Added support for function invocation on leading and trailing edges for debounce and throttle.
- Added compatibility functions for debounce, throttle, curry, isNumber, and isNaN.
- Improved performance for at, zip, zipWith, and drop.
Version v1.19.0
Released on September 14th, 2024.
- Added support for isDate, curry, upperCase.
- Added compatibility functions for pick, omit, unset, toPath, trim, trimStart, trimEnd, isInteger, isSafeInteger, snakeCase, startCase, lowerCase, kebabCase, ceil, floor, round.
- Enhanced clone to handle
Buffer
s,SharedArrayBuffer
s,File
s,Blob
s,TypedArray
s, andError
s. - Fixed a bug where mergeWith did not preserve the original properties of the
target
object. - Fixed a bug where groupBy couldn't group with keys like
toString
andindexOf
. - Improved performance for has and get.
Version v1.18.0
Released on September 12th, 2024.
- Added support for isObject, findLastIndex, parseInt, rearg, conforms, conformsTo, bindKey, some, fromPairs, isArrayLikeObject, escapeRegExp, sortBy, isWeakSet, isWeakMap, flatMapDeep, escape, unescape, repeat, pad, join, and spread.
- Improved performance for deburr.
Version v1.17.0
Released on August 31st, 2024.
New Features
- Added support for new functions: at, pullAt, deburr, lowerFirst, upperFirst, and isRegExp.
- Enhanced orderBy and sortBy to support function criteria.
- countBy now supports numeric and symbol keys.
Bug Fixes
- Updated type definitions for throttle and debounce.
- (
es-toolkit/compat
) Fixed orderBy to correctly handle deep keys even when object shapes differ (#427).
Version v1.16.0
Released on August 15th, 2024.
- Added support for memoize, find, findIndex, has, partial, partialRight, sortBy, isString, rest, padEnd.
Version v1.15.1
Released on August 10th, 2024.
- Disabled implicit conversion of values in orderBy for performance and simplicity.
Version v1.15.0
Released on August 10th, 2024.
- Added support for merge, mergeWith, toMerged, isSymbol, pascalCase.
- Added compatibility tests with lodash for orderBy.
Version v1.14.0
Released on August 9th, 2024.
- (
es-toolkit
) Added support for mapKeys, mapValues, cloneDeep, before, after, isSubset, ary, unary, flattenDeep, isEqual, isFunction, isBoolean, isPrimitive, and isTypedArray. - (
es-toolkit/compat
) Added support for matches, isMatch, isArray, isArrayLike, isObjectLike, isArguments, size, bind, flattenDepth, and padStart. - Added compatibility tests with lodash for many functions like initial, last, takeRight, without, uniq, invert, isNull, isUndefined, and isNil.
Version v1.13.1
Released on July 20th, 2024.
- Use the compatibility layer
es-toolkit/compat
in legacy CDN builds.
Version v1.13.0
Released on July 20th, 2024.
es-toolkit
can now be used in various CDNs, like unpkg and jsdelivr. See more in our usage docs
Features
- Added support for flattenObject, isPlainObject, isLength. (3e60443, 3764993, #245)
- Added support for concat in our compatibility layer
es-toolkit/compat
. (e09517f)
Lodash Compatibility
- Ensured compatibility with difference and take
Version v1.12.0
Released on July 19th, 2024.
- Fixed a bug where
es-toolkit/compat
was not available in modern Node.js environments. - Added support for max and min in our compatibility layer
es-toolkit/compat
. (e1e6e38)
Version v1.11.0
Released on July 18th, 2024.
Introducing es-toolkit/compat
We're introducing es-toolkit/compat
, a new module designed as a drop-in replacement for lodash. It replicates lodash's API, making it easier to switch between the two libraries.
es-toolkit/compat
is undergoing rigorous testing using real lodash
test cases. Initial benchmarks suggest it's typically 5% slower and increases bundle size by 10% compared to the original es-toolkit
.
This module is intended to facilitate a smooth transition and should be replaced with the original es-toolkit
for optimal performance once migration is complete.
For more information, see our compatibility documentation.
Features
- Added support for get and set in our compatibility layer
es-toolkit/compat
. (https://github.com/toss/es-toolkit/pull/232, https://github.com/toss/es-toolkit/pull/223) - Added support for zipObjectDeep in our compatibility layer
es-toolkit/compat
. (https://github.com/toss/es-toolkit/pull/150) - Added support for flatMap. (https://github.com/toss/es-toolkit/pull/209)
- Added support for startCase, startsWith, and endsWith. (https://github.com/toss/es-toolkit/pull/224).
- Added support for withTimeout. (https://github.com/toss/es-toolkit/pull/210)
Bug fixes
- Fixed
drop
anddropRight
incorrectly accepting negative integers. (https://github.com/toss/es-toolkit/pull/218) - Fixed
invert
not to invert inherited properties. (https://github.com/toss/es-toolkit/pull/221)
Performance Improvements
- Improved performance for
dropRightWhile
. (https://github.com/toss/es-toolkit/pull/220)
Version v1.10.1
Released on July 15th, 2024.
Version v1.10.0
Released on July 14th, 2024.
Features
- Add support for capitalize, snakeCase, kebabCase, camelCase and lowerCase. (https://github.com/toss/es-toolkit/pull/152, https://github.com/toss/es-toolkit/pull/161, https://github.com/toss/es-toolkit/pull/162, https://github.com/toss/es-toolkit/pull/166, 21d6530).
- Add support for negate. (https://github.com/toss/es-toolkit/pull/177)
- Add support for isEqual. (https://github.com/toss/es-toolkit/pull/174)
- Add support for clone. (https://github.com/toss/es-toolkit/pull/155)
- Add support for toFilled. (https://github.com/toss/es-toolkit/pull/154)
- Add support for initial and last. (https://github.com/toss/es-toolkit/pull/188, https://github.com/toss/es-toolkit/pull/149)
- Add support for flattenDeep. (https://github.com/toss/es-toolkit/pull/160)
Performance Improvements
- Optimize the performance of isNil by simplifying its check. (489ac76)
- Optimize the performance of sum. (https://github.com/toss/es-toolkit/pull/155)
Version v1.9.0
Released on July 10th, 2024.
- Add support for head and tail. (https://github.com/toss/es-toolkit/pull/131, https://github.com/toss/es-toolkit/pull/143).
- Add support for unzip. (https://github.com/toss/es-toolkit/pull/130)
- Add support for flatten, which is six times faster than
Array#flat
. (https://github.com/toss/es-toolkit/pull/147)
Version v1.8.0
Released on July 5th, 2024.
- Add support for orderBy. (https://github.com/toss/es-toolkit/pull/123)
- Add support for invert. (https://github.com/toss/es-toolkit/pull/125)
- Add support for inRange. (https://github.com/toss/es-toolkit/pull/124)
Version v1.7.1
Released on July 3rd, 2024.
- Add support for unzipWith. (https://github.com/toss/es-toolkit/pull/113)
- Add support for forEachRight. (https://github.com/toss/es-toolkit/pull/119)
- Add support for countBy. (https://github.com/toss/es-toolkit/pull/117)
- Add support for without. (https://github.com/toss/es-toolkit/pull/115)
- Add support for fill. (https://github.com/toss/es-toolkit/pull/109)
- Add support for sampleSize. (https://github.com/toss/es-toolkit/pull/101)
- Add support for meanBy. (https://github.com/toss/es-toolkit/pull/104)
- Accept number and symbol keys in keyBy and groupBy (https://github.com/toss/es-toolkit/pull/98, https://github.com/toss/es-toolkit/pull/99)
Version v1.6.1
Released on June 30th, 2024.
- Publish package on JSR.
Version v1.6.0
Released on June 30th, 2024.
Features
- Add support for keyBy. (https://github.com/toss/es-toolkit/pull/93).
- Add support for zipObject. (https://github.com/toss/es-toolkit/pull/92).
- Add support for compact. (60ae59b)
- Add support for mean. (715bc60)
Version v1.5.0
Released on June 28th, 2024.
Features
- Add support for range. (https://github.com/toss/es-toolkit/pull/77, 2db11d8).
- Add support for minBy (https://github.com/toss/es-toolkit/pull/71).
- Add support for maxBy (https://github.com/toss/es-toolkit/pull/64).
Bug fixes
- Enforce stricter argument types in
pickBy
andomitBy
. (https://github.com/toss/es-toolkit/pull/60) - Fix a bug in
difference
where one array parameter was not readonly. (https://github.com/toss/es-toolkit/pull/83) - Fix a bug in
round
where it incorrectly accepts floating-point numbers asprecision
. (https://github.com/toss/es-toolkit/pull/79)
Version v1.4.0
Released on June 15th, 2024.
Features
- Add support for random. (https://github.com/toss/es-toolkit/pull/53)
- Add support for randomInt. (99a34e4)
- Add support for using AbortSignals to cancel the
Promise
returned bydelay
. (https://github.com/toss/es-toolkit/pull/52)
Performance Optimizations
- Optimized
uniqBy
. (60e7974)
Version v1.3.1
Released on June 15th, 2024.
- Fixed a bug in
dropWhile
where it incorrectly returned the entire array when no elements matched the predicate. (https://github.com/toss/es-toolkit/pull/49)
Version v1.3.0
Released on June 14th, 2024.
Features
- Add support for using AbortSignals to cancel
debounce
d functions. (https://github.com/toss/es-toolkit/pull/45)
Performance Optimizations
- Optimize the time complexity of
intersection
. (https://github.com/toss/es-toolkit/pull/47)
Version v1.2.2
Released on June 13th, 2024.
- Add support for
readonly
arrays in array utilities. (https://github.com/toss/es-toolkit/pull/32, e595e5e) - Optimize the time complexity of
uniq
. (https://github.com/toss/es-toolkit/pull/40) - Optimize the time complexity of
intersectionBy
. (https://github.com/toss/es-toolkit/pull/44)
Version v1.2.1
Released on June 13th, 2024.
- Ensure that the
omit
andpick
functions only accept plain JavaScript objects as arguments. (https://github.com/toss/es-toolkit/pull/35)
Version v1.2.0
Released on June 8th, 2024.
Features
- Added the
noop
function. (678028dd3d
)
Performance Improvements
- Optimized the
difference
anddifferenceBy
functions for better performance with large arrays. (https://github.com/toss/es-toolkit/pull/27, https://github.com/toss/es-toolkit/pull/28)
Bug fixes
- Fixed
shuffle
to ensure it does not modify the original array. (https://github.com/toss/es-toolkit/pull/29)
Version v1.1.0
Released on June 5th, 2024.
- Support passing arguments to throttled and debounced functions. (https://github.com/toss/es-toolkit/pull/26)
Version v1.0.4
Released on June 4th, 2024.
- Provide correct type declarations for ECMAScript Modules. (https://github.com/toss/es-toolkit/pull/21)
Version v1.0.3
Released on June 3rd, 2024.
- Provide correct types for
"module": "Node"
,"Node10"
, and"Node16"
. (https://github.com/toss/es-toolkit/pull/16)
Version v1.0.2
Initial release. Released on May 31th, 2024.