it's important to test your code, corey

This commit is contained in:
Corey Johnson
2011-09-02 18:08:37 -07:00
parent a481313826
commit 6d41492fd7

View File

@@ -31,9 +31,9 @@ defines = []
# cb - The Function that will actually run the code.
define = (args...) ->
defines.push ->
file = args[0]
file = args[0] if args.length > 1
cb = args[1] or args[0]
exports = if file then __modules[file] else {}
exports = if file? then __modules[file] else {}
module = exports: exports
cb.call exports, require, exports, module
module.exports or exports