Permalink
Browse files

add support for require("module/name")

  • Loading branch information...
1 parent 4629c49 commit 662a039fcd0e063361ba34ebfe66b42677dbfd12 @nightwing nightwing committed Apr 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 extension/modules/mini-require.js
@@ -26,6 +26,9 @@ var Loader =
require: function(config, modules, callback)
{
+ if (typeof config == "string" && !modules && !callback)
+ return this.modules[config].exports;
+
this.config = config ? config : this.config;
this.currentModule = [];

0 comments on commit 662a039

Please sign in to comment.