rasync
v1.0.1
Published
Asynchronous require
Downloads
3
Readme
rasync
Async require for node.js
npm install rasync
Require modules asynchronously. Like AMD, but for 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"])
})
API
rasync(dependencies, callback)
dependencies
=>Array
(orString
if there is only one dependency)callback
=>Function
Require the dependencies passed to rasync. These dependencies will be passed to
callback
in the form of callback(err, dependency1[, dependecy2, dependencyN])
TEST
- Get rasync's source code. A simple
git clone https://github.com/medimatrix/rasync.git
will do. - Install
grunt-cli
(npm install -g grunt-cli
) - Run
npm install
in the folder that contains rasync's source code. - Run
npm test
LICENSE
Copyright Médi-Rémi Hashim 2014-2015
Licensed under the GPLv3.
See LICENSE.