Zero Dependency
No third-party dependencies, all features are implemented internally, reducing project complexity
A modern, simpler, more type-safe and powerful alternative to the old Lodash
Welcome to the Radash documentation site! Radash is a powerful zero-dependency frontend utility library designed to solve the problems of Lodash's outdated maintenance and insufficient type support.
npm install radash
import { range, tryit, select } from 'radash'
// Use range for iteration
for (const i of range(0, 10, 2)) {
console.log(i) // 0, 2, 4, 6, 8, 10
}
// Use tryit for error handling
const [err, data] = await tryit(fetch)('/api/users')
if (err) {
console.error('Failed to fetch users:', err)
return
}
// Use select for data transformation and filtering
const users = await data.json()
const activeUsers = select(users,
user => ({ ...user, status: 'active' }),
user => user.isActive
)
Handles array-related operations, including sorting, filtering, transformation, etc.
Handles asynchronous operations, including parallel execution, error handling, etc.
Functional programming tools, including function composition, currying, etc.
Number processing tools.
Object manipulation tools.
Random number generation and random operations.
String processing tools.
Type checking tools.
MIT License
Start using Radash to make your JavaScript/TypeScript development more efficient!