sweet-compose:用于函数组合的 Sweet js 宏

时间:2021-06-03 14:15:37
【文件属性】:
文件名称:sweet-compose:用于函数组合的 Sweet js 宏
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-03 14:15:37
JavaScript 甜蜜组合 用于函数组合的 Sweet js 宏 用法 $ npm install --save sweet-compose $ sjs -m sweet-compose myfile.js var assert = require ( 'chai' ) . assert it ( 'should compose two functions' , function ( ) { function add1 ( x ) { return x + 1 ; } function double ( x ) { return x * 2 ; } assert . equal ( ( double + . add1 ) ( 2 ) , 6 ) } ) it ( 'should sequence two functions' , function ( ) { function add1 ( x
【文件预览】:
sweet-compose-master
----.gitignore(13B)
----index.sjs(330B)
----package.json(810B)
----LICENSE(804B)
----README.md(682B)
----test-src()
--------spec.js(357B)

网友评论