From 78f8b6771cf1bb67b5380a75b45367600aee30d6 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 5 Oct 2009 20:35:48 +0200 Subject: [PATCH] Add require.async(). --- src/node.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node.js b/src/node.js index d8a721e599..05de28bd59 100644 --- a/src/node.js +++ b/src/node.js @@ -260,6 +260,8 @@ node.Module.prototype.loadScript = function (loadPromise) { return requireAsync(url).wait(); } + require.async = requireAsync; + // create wrapper function var wrapper = "function (__filename, exports, require) { " + content + "\n};"; var compiled_wrapper = node.compile(wrapper, self.filename);