Radash is a modern, functional utility library for JavaScript and TypeScript, providing a comprehensive collection of helper functions with zero external dependencies. It's designed to be simple, powerful, and fully typed, offering alternatives to functions found in older libraries like Lodash while focusing on a smaller bundle size and native ESM support. The library is actively maintained, currently on version 12.1.1, with frequent minor and patch releases. Key differentiators include its strong, native TypeScript typing, which aims to improve type safety compared to libraries that often require extra type packages, and a modular design that facilitates tree-shaking for optimized bundle sizes. Radash focuses on functions that augment modern JavaScript features, intentionally omitting those already well-covered by the language itself, leading to a cleaner and more intuitive API.
npm install radashVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates core Radash functionalities including array manipulation (`max`, `sum`), object transformation (`objectify`, `pick`), and robust asynchronous error handling (`tryit`).
Review calls to `_.sum` (or `sum` if individually imported) and ensure that the values being summed are explicitly numbers or safely convertible. Adjust types or provide explicit type assertions if necessary.
Familiarize yourself with Radash's API for specific data structures. Use dedicated object utilities (e.g., `mapValues`, `mapKeys`) or array utilities (`map`) as appropriate, rather than relying on a single function to handle multiple input types.
Consult the Radash documentation for available functions. Where a native JavaScript solution exists, prefer it. For example, instead of a `_.get` with string paths from Lodash, consider optional chaining or `_.get` with a type-safe accessor function as demonstrated in Radash.
No code fix required. Ensure your project's license compatibility policies are updated if you upgrade from versions prior to 10.6.0.
Verify the function name against the Radash documentation. If using `import * as _ from 'radash'`, ensure the function is accessed via `_.functionName`. If using named imports, ensure `functionName` is directly exported. For CommonJS, `const { functionName } = require('radash')` is typical.Ensure `radash` is correctly installed (`npm install radash` or `yarn add radash`). Verify your `tsconfig.json` includes appropriate `moduleResolution` (e.g., 'NodeNext' or 'Bundler') and `module` (e.g., 'ESNext') settings for modern package resolution. Ensure TypeScript is up-to-date.
No dependency data recorded yet.