npm.io
3.0.0 • Published 7 years ago

squad

Licence
MIT
Version
3.0.0
Deps
0
Size
6 kB
Vulns
0
Weekly
0
Stars
1

squad License NPM version Dependency Status Build Status

Right-to-left function composition. The rightmost function may have any arity. The remaining functions must be unary.

Install

npm i squad

How to use?

const squad = require('squad');

const buzz = (str) => str + '... zzz...';
const scream = (str) => str.toUpperCase();
const noise = squad(buzz, scream);

noise('hello');
// returns
'HELLO... zzz....'

Environments

In old node.js environments that supports es5 only, squad could be used with:

var squad = require('squad/legacy');

License

MIT

Keywords