squad

right-to-left function composition

  • squad

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
squad
103.0.06 years ago9 years agoMinified + gzip package size for squad in KB

Readme

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