Skip to content

refactor: replace lodash-es with native JS builtins#41

Merged
NaridaL merged 1 commit into
mainfrom
refactor/remove-lodash
Apr 12, 2026
Merged

refactor: replace lodash-es with native JS builtins#41
NaridaL merged 1 commit into
mainfrom
refactor/remove-lodash

Conversation

@NaridaL
Copy link
Copy Markdown
Owner

@NaridaL NaridaL commented Apr 12, 2026

Replace all lodash-es usage with native JavaScript built-ins and remove the dependency.

Replacements

lodash-es Replacement
last(arr) arr[arr.length - 1]
pick(obj, "key") { key: obj.key }
clamp(val, lo, hi) Local clamp() using Math.max/Math.min
merge(a, b) .map() + spread
mapValues(obj, fn) Object.fromEntries(Object.entries().map())
pull(arr, item) .filter()
noop () => {}
findLast(arr, fn) Array.prototype.findLast() (ES2023)
nth(arr, -n) arr.at(-n) (ES2022)
Many<T> type T | T[]

Removes lodash-es and @types/lodash-es from dependencies.

- last() -> arr[arr.length - 1]
- pick(obj, key) -> { key: obj.key }
- clamp() -> local function using Math.max/Math.min
- merge() -> .map() + spread
- mapValues() -> Object.fromEntries(Object.entries().map())
- pull() -> .filter()
- noop -> () => {}
- findLast() -> Array.prototype.findLast() (ES2023)
- nth(arr, -n) -> arr.at(-n) (ES2022)
- Many<T> type -> T | T[]

Remove lodash-es and @types/lodash-es dependencies.
@NaridaL NaridaL merged commit 1dda1fe into main Apr 12, 2026
2 checks passed
@NaridaL NaridaL deleted the refactor/remove-lodash branch April 12, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant