0.0.1 • Published 7 years ago

@tsfp/compose v0.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
7 years ago

@tsfp/compose

coverage build npm version

A compose function written in TypeScript.

Installing

Using npm

npm install @tsfp/compose

Using yarn

yarn add @tsfp/compose

Usage

import compose from "@tsfp/compose";

const add = (right: number) => (left: number) => left + right;
const divide = (divisor: number) => (dividend: number) => dividend / divisor;
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. Both the functionality of the code at runtime and its types should be tested.

Using npm

npm test

Using yarn

yarn test

0.0.1

7 years ago