es-toolkit
es-toolkit copied to clipboard
A modern JavaScript utility library that's 2-3 times faster and up to 97% smaller—a major upgrade to lodash.
When running the code below, the IDE indicates that the value can still be undefined/null, although it can't. `ObjectLike` should potentially use `NotNull` to assert that the returned value cannot...
Right now the functions countBy, groupBy, keyBy return an object/dict, which is good. But there are times I want a more complex key to be indexed, and a Map type...
It's a little old but you might want to take a look at https://modernjavascript.blogspot.com/2013/08/building-better-debounce.html (I wrote many moons ago). Saw es-toolkit and thought about it. lodash and underscore both use...
Why doesn't debounce in the main package provide a maxWait option? The maxWait option can help solve the problem of long delays. ```ts const debouncedFn = debounce(fn, 1000); debouncedFn() //...
Currently, the retry function retries on all errors. **It would be useful to have conditional retry support based on error type.** ### Use case ```tsx // Want to retry only...
It should be possible to `memoize` results of a function, **even if it has more than one argument**, when the developer provides a custom `getCacheKey` function which computes a key...
The performance comparison table in the documentation is currently showing results for [email protected] vs [email protected], but the library is now at version 1.39.6. The performance metrics displayed are significantly outdated...
in the `retry` function there is a `retries` option, but it is actually the number of attempts, not retries. for example this code ``` import { delay, retry } from...
`lodash`, as well as `es-toolkit/compat`, do not change the return signature of a debounced function. Was the change in `es-toolkit` intentional?
In looking at replacing Lodash with es-toolkit in our codebase, I noticed that we make heavy use of Lodash's `min` and `max`, but those functions are flagged as compat in...