Minimal, hand-picked and well-tested utilities needed to unlock functional programming. Zero dependencies. Provided as CJS, UMD and ESM modules.
pipe
: (a -> b) -> (b -> c) -> a -> ccompose
: (b -> c) -> (a -> b) -> a -> cpick
: ({a}) -> ([a]) -> {a}omit
: ({a}) -> ([a]) -> {a}head
: ([a]) -> atail
: ([a]) -> [a]curry
: ((a, b) -> c) -> a -> b -> czip
: - ([a], [b]) -> [[a, b]]prop
: - (a) -> ({a}) -> a
I may be adding more, but the intention is to find the perfect set of core FP utilities and keep it as minimal as possible.
npm install funf --save
or yarn add funf
npm run test
MIT