@tsfp/compose
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@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

/@tsfp/compose/

    Package Sidebar

    Install

    npm i @tsfp/compose

    Weekly Downloads

    2

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    792 kB

    Total Files

    16

    Last publish

    Collaborators

    • jewetnitg