diff options
author | Gus Caplan <me@gus.host> | 2018-01-13 23:35:51 -0800 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2018-01-30 17:00:57 -0800 |
commit | 0993fbe5b213d0fe746c3162bcda85f6c66bb552 (patch) | |
tree | f0a1ffef2ab24f1da963a23a43f3dd58eed5bba0 /lib/vm.js | |
parent | 2033a9f4362ee46b0fbddf9caf9cf6238391561e (diff) | |
download | android-node-v8-0993fbe5b213d0fe746c3162bcda85f6c66bb552.tar.gz android-node-v8-0993fbe5b213d0fe746c3162bcda85f6c66bb552.tar.bz2 android-node-v8-0993fbe5b213d0fe746c3162bcda85f6c66bb552.zip |
vm: add modules
Adds vm.Module, which wraps around ModuleWrap to provide an interface
for developers to work with modules in a more reflective manner.
Co-authored-by: Timothy Gu <timothygu99@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/17560
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'lib/vm.js')
-rw-r--r-- | lib/vm.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -192,5 +192,8 @@ module.exports = { runInContext, runInNewContext, runInThisContext, - isContext + isContext, }; + +if (process.binding('config').experimentalVMModules) + module.exports.Module = require('internal/vm/Module').Module; |