You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
401 B

2 years ago
var toArr = require('./toArr');
exports = function(name, requires, method) {
if (arguments.length === 2) {
method = requires;
requires = [];
}
define(name, requires, method);
};
var modules = (exports._modules = {});
function define(name, requires, method) {
modules[name] = {
requires: toArr(requires),
body: method
};
}
module.exports = exports;