ramda
Ramda is a functional programming library for JavaScript that emphasizes immutability, pure functions, and point-free style through automatic currying of all fu…
Installation
npm install ramda
yarn add ramda
pnpm add ramda
Import
import * as R from 'ramda';
Quick Example
import * as R from 'ramda';
const double = R.multiply(2);
const addThenDouble = R.pipe(R.add(10), double);
console.log(addThenDouble(5)); // 30
const getNames = R.map(R.prop('name'));
console.log(getNames([{ name: 'Alice' }]));About ramda
Ramda is a functional programming library for JavaScript that emphasizes immutability, pure functions, and point-free style through automatic currying of all functions. Unlike Lodash which takes the data as the first argument, Ramda places the data argument last, making it natural to build new functions through composition without mentioning the data they operate on. Every Ramda function is automatically curried, meaning you can call any function with fewer arguments than it expects and receive a new function that takes the remaining arguments. This enables powerful function composition using R.pipe and R.compose to build complex transformations from simple building blocks. Ramda provides lenses for focusing on and transforming nested immutable data structures, transducers for efficient collection processing, and a comprehensive set of functions for array, object, string, and logic operations. The library is particularly popular in codebases that follow functional programming patterns, favoring composition over imperative sequences. Ramda pairs well with TypeScript through @types/ramda and with libraries like Redux for building data transformation pipelines.
Quick Facts
| Package | ramda |
| Category | Utility |
| Weekly Downloads | 6M+ |
| License | MIT |
| Install | npm install ramda |
Related Packages
Browse npm Packages by Category
Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.