callbag-from-function

时间:2021-05-25 20:36:31
【文件属性】:
文件名称:callbag-from-function
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-25 20:36:31
JavaScript 功能调用包 从函数生成 。 每当调用该函数时,源将发出该函数返回的内容。 npm install callbag-from-function 用法 const {source, emitter} = fromFunction(someFunc); 现在,每当您使用...args调用emitter时, source将发出使用...args调用时someFunc返回的内容。 emitter还将返回发射的值。 如果未传递任何函数,则将使用identity函数。 source是“热门”(使用 ),这意味着它可以许多听众。 例子 用状态流将应用程序中的动作创建者包装起来。 const forEach = require ( 'callbag-for-each' ) ; const fromFunction = require ( 'callbag-from-function' ) ;
【文件预览】:
callbag-from-function-master
----.gitignore(26B)
----LICENSE(1KB)
----package.json(742B)
----readme.md(1KB)
----index.js(508B)
----test.js(1KB)
----package-lock.json(11KB)

网友评论