🪴 Second Brain

Search IconIcon to open search

Ramda

Created April 17, 2022

Ramda is a Javascript library that emphasizes on writing pure Functional programming.
It takes a moment to understand the power and beauty of using it, especially that its patterns are different than usual. However, the learning curve pays off when complex logic is needed.

Here’s a simple example:

1
2
3
4
5
6
7
const droppableId = "hello-123"
const result = R.pipe(
  R.split("-"),
  R.last,
  parseInt
)(droppableId);
console.log(result) // 123

The pipe is what I use most as it allows the creation of complex building blocks.


Interactive Graph