 # Root object hook
 do (root = module?.exports ? this) ->
   root.udefine or= (name, deps, factory) ->
-    if Array.isArray name
-      [name, deps, factory] = [undefined, [], deps]
-    else
-      if typeof name is 'function'
-        [name, deps, factory] = [undefined, [], name]
+    throw new Error 'A udefine module needs to have a name' unless name?
+    
+    [name, deps, factory] = [name, [], deps] if typeof deps is 'function'
       
     # Define, either AMD or UMD (if any?)
     if define?

  
  root.udefine.globals or= {}
  root.udefine.commonjs or= {}
  
  null

'use strict'

# Module switch
hasModule = module? and module.exports
