@ts-commons/fp
A collection of function programming utilities written in TypeScript.
Installing
Using npm
npm install @ts-commons/fp
Using yarn
yarn add @ts-commons/fp
Usage
import { compose } from "@ts-commons/fp";
import { add, divide } from "@ts-commons/fp/math";
const add3AndDivideBy2 = compose(divide(2), add(3));
add3AndDivideBy2(3); // returns 3 ((3 + 3) / 2)
For more information see the API documentation.
Contributing
Contributions in the form of pull requests and bug reports are appreciated.
Running tests
Tests are ran using the test
npm script.
Using npm
npm test
Using yarn
yarn test