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

1.0.0 • Public • Published

Compose

NPM version Coverage Status Dependencies Build Status license issues

Compose functions.

Install

$ npm install @zcorky/compose

Usage

// import
import compose from '@zcorky/compose';

// filter zero
const filter = data => data.filter(d => d.username === 'zero');

// map salary * 2
const map = data => data.map(d => (d.salary *= 2, d))

const resolve = compose(
  filter,
  map,
);

fetch('/api')
  .then(res => res.json())
  .then(
    resolve,
  );

Relatived

/@zcorky/compose/

    Package Sidebar

    Install

    npm i @zcorky/compose

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.25 kB

    Total Files

    5

    Last publish

    Collaborators

    • uniquecolesmith