in在单独的过程中执行Node.js函数-Node.js开发

时间:2021-05-27 10:29:59
【文件属性】:
文件名称:in在单独的过程中执行Node.js函数-Node.js开发
文件大小:14KB
文件格式:ZIP
更新时间:2021-05-27 10:29:59
Node.js Miscellaneous 在一个单独的过程中舒适地运行Node.js函数。 const forkedAsyncFunction = branchy(heavySyncFunction)安装npm install --save branchy基本用法超级简单-将您的函数传递给在一个单独的进程中舒适地运行Node.js函数。 const forkedAsyncFunction = branchy(heavySyncFunction)安装npm install --save branchy基本用法超级简单—将函数传递给branchy并获得其异步,无条件返回版本:const branchy = require('branchy')//同步“ add”,返回数字const adder =(a,b)=> a + b //子进程中的异步“ add”,返回承诺解析为数字const的forkedAdder = branchy(adder)
【文件预览】:
branchy-master
----.gitignore(3KB)
----README.md(6KB)
----branchy.svg(2KB)
----.github()
--------workflows()
--------dependabot.yml(143B)
----test()
--------basic.spec.js(2KB)
--------concurrency.spec.js(2KB)
--------modules()
----.prettierrc(288B)
----LICENSE(1KB)
----.eslintrc.yml(114B)
----package.json(908B)
----.editorconfig(146B)
----lib()
--------branchy.js(4KB)
--------thread.js(3KB)
--------context.js(355B)

网友评论