A deadly simple alternative to lodash.
- 🚀 No dependencies
- ⚡️ Lightweight
- 💪 Typescript first(written in TypeScript and suitable for TypeScript users)
- 🍃 Tree shakable
- 📝 JSDoc available (easy to use).
- 🗺️ Sourcemap and declarationMap is available (You can jump directly to the
.ts
file of this library instead ofd.ts
).
npm install rhodash
# or yarn add rhodash
You can simply try here.
import { pick, omit } from 'rhodash'
pick({ a: 1, b: 2, c: 3 }, ['a', 'b']) // { a: 1, b: 2 }
omit({ a: 1, b: 2, c: 3 }, ['a', 'b']) // { c: 3 }
const { pick, omit } = require('rhodash')
pick({ a: 1, b: 2, c: 3 }, ['a', 'b']) // { a: 1, b: 2 }
omit({ a: 1, b: 2, c: 3 }, ['a', 'b']) // { c: 3 }
<script src="https://unpkg.com/[email protected]"></script>
<script>
document.write(rhodash.pick({ a: 1, b: 2, c: 3 }, ['a', 'b']))
</script>
You can see utility methods document here.
rhodash | Lodash | just | rambda | |
---|---|---|---|---|
️📦️ Size of whole the package | - You should install each packages one by one. |
|||
📚 Easy-to-understand JSDoc | ✅ (It has both description and example) |
❌ | ❌ | (It only has description) |
🦘 Ease of jumping to the original source | 👍 | 🤔 (You can, but it is complex) |
❌ | ❌ |
✏️ Remarks | This library | Most popular, but huge. | You need to install the corresponding packages one by one. It will increase the number of lines in package.json. | Designed for functional programming, so it has many extra functions for those who do not need functional programming. In addition, some of the functions have a different API than Lodash's |