just-compose
TypeScript icon, indicating that this package has built-in type declarations

2.3.0 • Public • Published

just-compose

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-compose
yarn add just-compose

Return a function composed of 2 or more functions

import compose from 'just-compose';

const sqRootBiggest = compose(Math.max, Math.sqrt, Math.trunc);
sqRootBiggest(10, 5); // 3
sqRootBiggest(7, 0, 16); // 4

Package Sidebar

Install

npm i just-compose

Weekly Downloads

1,770

Version

2.3.0

License

MIT

Unpacked Size

7.6 kB

Total Files

9

Last publish

Collaborators

  • angus-c