π§ Fast, modern, and practical utility library for FP in TypeScript.
See the code
Fast, modern, and practical utility library for FP in TypeScript.
Full documentation can be found here.
ReScript, which generates highly performant JavaScript code (see the benchmark results here)data-first approachTypeScript and FlowOption and Result typesyarn add @mobily/ts-belt
or with npm
npm install @mobily/ts-belt --save
| Module | Namespace | Description |
|---|---|---|
| Array | A | Utility functions for Array. |
| Boolean | B | Utility functions for Boolean. |
| Number | N | Utility functions for Number. |
| Object (Dict) | D | Utility functions for Object. |
| String | S | Utility functions for String. |
| Guards | G | Various TypeScript guards. |
| Option | O | Functions for handling the Option data type that represents the existence and nonexistence of a value. |
| Result | R | Functions for describing the result of a certain operation without relying on exceptions. |
| Function | F | Other useful functions. |
import { A, O, N, pipe } from '@mobily/ts-belt'
pipe(
[1, 2, 3, 4, 5], // β [1, 2, 3, 4, 5]
A.dropExactly(2), // β Some([3, 4, 5])
O.flatMap(A.head), // β Some(3)
O.map(N.multiply(10)), // β Some(30)
O.getWithDefault(0), // β 30
) // β 30
The MIT License.
See LICENSE
Overall
Maintained
Code review
Latest release
Releases this year
241 followers Β· starred Apr 2025
40 followers Β· starred Oct 2023
106 followers Β· starred Jul 2023
173 followers Β· starred May 2022
π§ Fast, modern, and practical utility library for FP in TypeScript.
See the code
Fast, modern, and practical utility library for FP in TypeScript.
Full documentation can be found here.
ReScript, which generates highly performant JavaScript code (see the benchmark results here)data-first approachTypeScript and FlowOption and Result typesyarn add @mobily/ts-belt
or with npm
npm install @mobily/ts-belt --save
| Module | Namespace | Description |
|---|---|---|
| Array | A | Utility functions for Array. |
| Boolean | B | Utility functions for Boolean. |
| Number | N | Utility functions for Number. |
| Object (Dict) | D | Utility functions for Object. |
| String | S | Utility functions for String. |
| Guards | G | Various TypeScript guards. |
| Option | O | Functions for handling the Option data type that represents the existence and nonexistence of a value. |
| Result | R | Functions for describing the result of a certain operation without relying on exceptions. |
| Function | F | Other useful functions. |
import { A, O, N, pipe } from '@mobily/ts-belt'
pipe(
[1, 2, 3, 4, 5], // β [1, 2, 3, 4, 5]
A.dropExactly(2), // β Some([3, 4, 5])
O.flatMap(A.head), // β Some(3)
O.map(N.multiply(10)), // β Some(30)
O.getWithDefault(0), // β 30
) // β 30
The MIT License.
See LICENSE
Overall
Maintained
Code review
Latest release
Releases this year
241 followers Β· starred Apr 2025
40 followers Β· starred Oct 2023
106 followers Β· starred Jul 2023
173 followers Β· starred May 2022