squad

2018-10-23 admin

squad是什么

什么是squad,right-to-left function composition

squad使用教程帮助文档

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-43447.html

文章标题:squad

回到顶部