Skip to content

Instantly share code, notes, and snippets.

if (!module.constructor.prototype.declare) {
module.constructor.prototype.declare = function(deps, factory) {
if (!factory)
factory = deps;
var _self = this;
var req = function(id) {
if (id.indexOf("./") == 0)
id = _self.filename.match(/(.*\/)/)[1] + id.slice(2)
return require(id);