1.0.1 • Published 11 years ago
rasync v1.0.1
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(orStringif 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.gitwill do. - Install
grunt-cli(npm install -g grunt-cli) - Run
npm installin 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.