npm / es-toolkit
es-toolkit
What changed in es-toolkit 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
14 breaking5 security59 new APIs and options4 performance6 behavior and defaults2 tooling140 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inites-toolkit 1230 changes
Breaking changes 14
Now deburrs only Latin letters.
Now keeps letters of non-Latin scripts as they are.
Now leaves interpolated values out of the indentation calculation.
Now types keys like Object.keys, so numeric keys are strings.
The fp version now always returns T | undefined.
Now calls the function with the caller's this.
Now sorts NaN in a consistent position.
Now prioritizes nullish literal keys over paths.
No longer treats an own literal dotted key as a deep path.
No longer treats boxed Number objects as numbers.
Now places null and undefined values last when sorting.
Unused generic type parameters have been removed from the pull type signature.
Reverts the overload for runtime-determined key arrays.
Browser builds use UMD format instead of IIFE.
Security 5
Ignores __proto__ keys to prevent prototype pollution.
Rejects variable values and imports keys that are not plain parameter names, and replaces all whitespace in sourceURL to prevent code injection.
Stops when __proto__, constructor, or prototype appears before the last path key, preventing deletion of built-in prototype properties.
Blocks constructor.prototype paths to prevent prototype pollution.
The polyfill avoids Function(...), supporting CSP environments without unsafe-eval.
New APIs and options 59
Per-function imports are supported, allowing developers to import chunk directly from es-toolkit/array/chunk.
Compares errors like Lodash.
Added the DistributiveOmit type.
Added hash in the new es-toolkit/util/hash entrypoint.
Added inverseLerp.
Added lerp.
Exported the PropertyPath type from es-toolkit/compat.
Added Queue to es-toolkit/util.
Added sentenceCase.
Added serialize to es-toolkit/util.
Added stringify to es-toolkit/query-string.
Added as a lazy iterator function, also available from es-toolkit/fp/iterator.
Added to es-toolkit/util.
Added the EmptyObject type.
Made the iterator functions available from the functional-programming iterator entrypoint.
Added a lazy iterator module with chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip, and cartesianProduct.
Added to es-toolkit/fp as a promise-aware left-to-right composition function.
Added the IsEqual type.
Added the JSONValue type.
Exported the Merge type.
Exported the ObjectKeys type.
Added the Primitive type.
Added the SetOptional type.
Added the SetRequired type.
Added the UnknownRecord type.
Adds a function that removes common leading whitespace from template strings.
Adds a function for recursively freezing objects.
Adds entries to es-toolkit/compat.
Adds entriesIn to es-toolkit/compat.
Adds a separate entrypoint with bigint counterparts of the listed math functions, leaving the number implementations unchanged.
Adds the preserveArrays option.
Adds an asynchronous object-keys mapping function.
Adds an asynchronous object-values mapping function.
Exports the type for camel-case object keys.
Exports the type for constant-case object keys.
Exports the type for kebab-case object keys.
Adds an object key casing function, completing the object key casing family.
Exports the type for Pascal-case object keys.
Exports the type for snake-case object keys.
Added a declaration-only entrypoint with compile-time type utilities: ValueOf, Simplify, Writable, NonEmptyArray, DeepPartial, and DeepReadonly.
Added a reusable data-last composition to es-toolkit/fp, built on pipe.
Added array utilities to es-toolkit/fp for slicing, grouping, set operations, ordering, zipping, and collection helpers.
Added the es-toolkit/fp entrypoint with data-last, pipeable utilities.
Added AbortSignal support to timeout.
Added AbortSignal support to withTimeout.
Adds allKeyed to the promise entrypoint.
Adds cartesianProduct to the array entrypoint.
Adds combinations to the array entrypoint.
Adds a server entrypoint with a colors namespace for ANSI terminal color utilities.
Adds the exec function.
Adds percentile to the math entrypoint.
Adds sortKeys to the object entrypoint.
keyBy is now exported from the map entrypoint.
Added the isEmptyObject predicate function.
Added the isNumber predicate function.
Implemented collection methods for Maps and Sets.
Added the shouldRetry option to the retry function.
Added an async utility for handling asynchronous operations.
Exported the interface for better type support.
Performance 4
Keeps release fast when many tasks are waiting.
A browser export condition was added to avoid including a 44KB Buffer polyfill.
Improved performance by using arrays to construct the deburrMap.
Improves performance by removing intermediate array creation.
Behavior and default changes 6
Now runs on Node.js 6 and ES2015 environments without transpilation or polyfills.
The fp version now always returns T | undefined.
The error type parameter now defaults to unknown.
AbortError now extends DOMException.
TimeoutError now extends DOMException.
Error cloning now supports AggregateError.
Tooling 2
es-toolkit usage skills were added to the Claude Code plugin marketplace.
Adds type guard support.
Fixes and other changes 140
The es-toolkit/compat implementation returns true for DOMException and error-like objects, matching Lodash's behavior.
Importing orderBy no longer triggers circular dependency warnings in bundlers.
Preserves explicitly provided null and undefined initial values.
Importing sortBy no longer triggers circular dependency warnings in bundlers.
The es-toolkit/compat implementation preserves separator boundaries, matching Lodash's behavior.
Preserves the offset and length of a DataView.
No longer treats length as an element of array-likes.
No longer treats objects with a numeric length as array-like.
Keeps surrogate pairs and combining marks together when the separator is empty.
Clears its timer after the operation completes.
Now matches Lodash on null operands.
Now coerces arguments like Lodash.
Keeps errors uncloned.
Now returns a plain object.
Now normalizes the predicate.
Treats a non-function iteratee as identity.
Calls the iteratee with only the element.
Compares errors like Lodash.
Now handles nullish inputs.
Now resolves the iteratee like Lodash.
Only uppercases the first letter of each word.
Now reads sparse array holes as undefined.
Escapes a string separator.
Passes comparator arguments in Lodash's order.
Matches titlecase letters, emoji sequences, and non-ASCII numerals and symbols, and keeps combining marks attached to their letter.
Now ignores the iteratee for a single array.
Now ignores the comparator for a single array.
Now freezes symbol and non-enumerable properties.
Preserves branded primitive types.
The fp version now matches each mapped value at most once in lazy pipes.
Keeps the input type when merging a type with itself or a narrower type, and uses the source type when a defined source replaces a nullable or primitive value.
Skips the maxWait invocation when both leading and trailing are false, matching Lodash.
Normalizes -0 to 0, matching Lodash.
Converts fromIndex to an integer, matching Lodash.
Normalizes the -0 path key, matching Lodash.
Assigns null values in array sources, matching Lodash.
Converts objects with a custom valueOf, matching Lodash.
Matches Lodash behavior when no comparator is given.
Fixed return-type inference to infer the deep merged type.
Fixed callback key types to be strings.
Accepts readonly arrays.
Returns an empty array for an empty collection with an Infinity size.
Normalizes -0 to 0.
Supports number, object, and nullish iteratee shorthands.
Handles object source patterns against primitive and non-plain-object targets like Lodash.
Treats a boolean as a property shorthand.
Returns undefined for empty array-like inputs.
Reads holes in sparse arrays as undefined.
Makes the iteratee optional with an identity default.
Skips nullish iteratee values.
Treats a key array as a single deep path.
Returns the array as-is when values is nullish.
Supports array-like objects and arguments.
Clamps the default size to the collection length.
Counts combined Unicode symbols as single characters.
Supports string inputs.
Converts non-array-like iterables.
Splits unquoted dotted keys inside brackets.
Renders nested nullish values like Lodash.
Normalizes -0 to 0 and supports string inputs.
Treats null keys and values as empty arrays.
Moves from the array category to the promise category.
Handles mixed array/object types consistently with merge.
Removes the correct elements with negative indices and accepts readonly arrays.
Now split ordinal numbers like Lodash and count string size and padding by code points for multi-byte characters.
Now removes all combining diacritical marks, matching Lodash.
Restored the standalone entry point.
Now treats a falsy, non-nullish doesMatch as a _.property shorthand instead of identity.
Now coerces a NaN fromIndex to 0 and converts fromIndex to an integer.
Now excludes the length property when matching array-like values.
No longer throws on a lone negative bound.
Now dedupes a single array, including by the iteratee, and keeps results consistent with Lodash.
Now normalizes a string path via toPath for this binding.
Now detects deep keys with stricter patterns.
Now coerces fromIndex like Lodash.
Restored Lodash-compatible comparison.
Now supports string inputs.
Now accepts any predicate return value, like Array.prototype.filter.
Now converts Sets to arrays like Lodash.
Now returns an empty array instead of throwing on empty input.
Now treats sparse array holes as undefined.
Now handles NaN and Infinity size values consistently with Lodash.
Now prefers a literal key over a dot-notation path when the picked value is undefined.
Improved Lodash compatibility for coerced bounds and floating-point options.
Fixed validation of multi-character trim strings so trimming stops correctly.
The package-root field is restored so jsDelivr serves the UMD bundle again.
The package-root field is restored so unpkg serves the UMD bundle again.
Fixed CDN script resolution by pointing jsdelivr and unpkg to the UMD bundle and dropping the misused browser field.
Treats sparse array holes as undefined.
Aligns nested primitive matching with lodash.
Improves checks for boxed values and non-numbers.
Coerces input to a string before parsing.
Keeps empty segments for consecutive and trailing dots.
Deep-clones the target so untouched nested values stay independent.
ESM resolution is fixed for compat subpaths in package exports.
Now coerces the upper bound when max is not a number.
Now returns Infinity for infinite values with precision.
Now counts array-like objects by their length.
Now coerces non-numeric values to 0.
Now handles functions with own enumerable properties.
Now propagates NaN, matching Math.max behavior.
Now propagates NaN, matching Math.min behavior.
Now respects explicitly passed nullish accumulators.
Fixes omitBy in compat so plain objects with numeric length are not treated as array-like.
Fixes uniqWith in compat to match lodash's comparator argument order.
Fixed missing countBy exports for map and set.
AbortError and TimeoutError now fall back to Error when DOMException is undefined.
Fixed missing forEach exports for map and set.
Added missing full-application overloads for 2, 3, and 4 arguments.
toCamelCaseKeys is now exported from compat for the browser bundle.
toSnakeCaseKeys is now exported from compat for the browser bundle.
Fixed the Deno install command to include the jsr: prefix.
Reverted the return type of sample so it no longer includes undefined.
Supports cloning Error objects.
Adds the missing default parameter for doesMatch.
Correctly matches the retry count with the retries option.
Includes undefined in the return union type.
Callbacks now include index and array parameters.
Enhanced type safety for the clone function.
Fixed an error when cloning an object with a null prototype.
Fixed to ensure consistency with lodash.
Now clones null-prototype objects as regular objects.
Now retains empty objects and arrays.
Fixed to match lodash's behavior.
Disables ES interpolation when a custom
interpolateis provided.Fixed the implementation and removed duplicates when the mapper produces the same values.
Fixed to match lodash's behavior.
Handles arrays and objects consistently and matches lodash's behavior with date values and array-like objects.
Fixed
throttleso it no longer works like debounce.Fixed type inference for edge cases and improved type inference for uppercase keys.
Now implements a type predicate to narrow the type to number.
Now implements a type predicate to narrow the type to number.
Fixed behavior that could add index properties to array-like objects.
Supports array-like objects.
Uses
getfor value retrieval in the updater function.Correctly handles undefined and null sources in the compatibility layer.
Supports runtime-determined key arrays with proper overloads.
Preserves the this context when called as a method.
Properly handles shared objects in merge logic.
Correctly returns types for non-plain objects.