https://github.com/zardoy/utils
My shared, random, but useful set of utils
https://github.com/zardoy/utils
Last synced: 9 months ago
JSON representation
My shared, random, but useful set of utils
- Host: GitHub
- URL: https://github.com/zardoy/utils
- Owner: zardoy
- License: mit
- Created: 2021-02-19T06:39:24.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T20:33:40.000Z (over 3 years ago)
- Last Synced: 2025-03-13T18:18:52.567Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://npmjs.com/@zardoy/utils
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.OUTDATED.MD
- License: LICENSE
Awesome Lists containing this project
README
# Strict Lodash
> Spoiler: this is not only stricter versin of lodash, this library also adds utils that I was missing
> I'll try to maintain the references to usages in popular repositories (like `vscode`)
It meant to be stricted and lightweight version of [Lodash](http://lodash.com/).
Also, this ilb contains helpers, that I didn't manage to find in other places.
# The Main Difference
This module tries to be as strict as possible. Also, `@types/lodash` has a lot of overloads, which doesn't make
Main goal of this module is to provide clear and precise type definitions, not to rewrite lodash library.
## What included
This methods are from lodash, they're doing the same thing, but has improved straightforward types.
- [ ] Array.findWithIndex
- [ ] Array.randomItem
- [ ] (cancelled) Array.removeItem - why not just `.remove`? To make sure, that coder understand that he can't use callback
- [ ] Array.mapAndFilter - Almost the same as `array.map()` but, it also removes all `undefined` values (T badge)
- [ ] Array.findWithIndex - Array.find and Array.findIndex combined into in method. Ex: `const [value, index] = [4, 5].findWithIndex(n => n === 5)
## TODO
- [ ] resolve `lodash-marker`s