【文件属性】:
文件名称:rasync:异步 node.js 需要
文件大小:16KB
文件格式:ZIP
更新时间:2021-07-04 11:22:31
JavaScript
同步
node.js 的异步需求
npm install rasync
需要异步模块。 像 AMD,但对于 CommonJS。
var rasync = require ( "rasync" )
rasync ( [ "fs" , "http" ] , function ( err , fs , http ) {
console . log ( fs . readFileSync ( "/etc/passwd" ) . toString ( ) )
console . log ( http . STATUS_CODES [ "418" ] )
} )
应用程序接口
rasync(dependencies, callback)
dependencies => Array (如果只有一个依赖项,则为String )
callback => Function
需要传递给 ra
【文件预览】:
rasync-master
----.jshintrc(120B)
----Gruntfile.js(844B)
----.travis.yml(131B)
----LICENSE(34KB)
----test()
--------exports.js(150B)
--------async.js(199B)
--------require.js(640B)
----README.md(1KB)
----.gitignore(13B)
----index.js(804B)
----package.json(702B)