@plexis/compose

0.0.22 • Public • Published

@plexis/compose

Compose 2 or more functions.

Installation npm i @plexis/compose

Usage

import compose from '@plexis/compose';
const inc = x => x + 1;
const add = (x, y) => x + y;
const ops = compose(
  inc,
  x => add(x, 2)
);

ops(1); // returns 4;
ops(10); // returns 13;

Aliases

import compose from '@plexis/compose';
import {compose, _do} from 'plexis';

Dependents (1)

Package Sidebar

Install

npm i @plexis/compose

Weekly Downloads

0

Version

0.0.22

License

MIT

Unpacked Size

4.31 kB

Total Files

6

Last publish

Collaborators

  • vorillaz