rhodash
v2.2.0
Published
A deadly simple alternative to lodash
Downloads
85
Readme
rhodash (ρ🏃)
A deadly simple alternative to lodash.
Feature
- 🚀 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
).
Install
npm install rhodash
# or yarn add rhodash
Usage
You can simply try here.
ES Module
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 }
CommonJS
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 }
Browser
<script src="https://unpkg.com/[email protected]"></script>
<script>
document.write(rhodash.pick({ a: 1, b: 2, c: 3 }, ['a', 'b']))
</script>
API
You can see utility methods document here.
Comparison
| | 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) | ❌ | ❌ | :warning: (It only has description) | | 🦘 Ease of jumping to the original source | 👍 | 🤔(You can, but it is complex) | ❌ | ❌ | | :pencil2: 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 |