Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
remove posibility of declaring dependencies by string notation
Browse files Browse the repository at this point in the history
  • Loading branch information
dfilatov committed May 24, 2013
1 parent 7c73b81 commit 8193efc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,14 @@ var DECL_STATES = {
/**
* Defines module
* @param {String} name
* @param {String|String[]} [deps]
* @param {String[]} [deps]
* @param {Function} declFn
*/
define = function(name, deps, declFn) {
if(!declFn) {
declFn = deps;
deps = [];
}
else if(typeof deps === 'string') {
deps = [deps];
}

var module = modulesStorage[name] || (modulesStorage[name] = {
name : name,
Expand All @@ -61,7 +58,7 @@ var DECL_STATES = {

/**
* Requires modules
* @param {String|String[]} modules
* @param {String[]} modules
* @param {Function} cb
*/
require = function(modules, cb) {
Expand All @@ -71,7 +68,7 @@ var DECL_STATES = {
}

pendingRequires.push({
modules : typeof modules === 'string'? [modules] : modules,
modules : modules,
cb : cb
});
},
Expand Down

0 comments on commit 8193efc

Please sign in to comment.