Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.
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