summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-15 19:21:56 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-11-15 19:21:56 -0800
commit702a923da74a4c62a0635b97ccfb20021a45a760 (patch)
treed3815b5e43dc7089eee6dd7fa7fb3a59589b51f7 /doc
parent473721979d7b872e1d8885508b9299723c70398e (diff)
downloadnodejs-702a923da74a4c62a0635b97ccfb20021a45a760.tar.gz
nodejs-702a923da74a4c62a0635b97ccfb20021a45a760.tar.bz2
nodejs-702a923da74a4c62a0635b97ccfb20021a45a760.zip
Fix docs for vm module
Diffstat (limited to 'doc')
-rw-r--r--doc/api/vm.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/vm.markdown b/doc/api/vm.markdown
index 450e51173..3fff4ba8b 100644
--- a/doc/api/vm.markdown
+++ b/doc/api/vm.markdown
@@ -16,7 +16,7 @@ Example of using `vm.runInThisContext` and `eval` to run the same code:
var localVar = 123,
usingscript, evaled,
- vm = require('javascript');
+ vm = require('vm');
usingscript = vm.runInThisContext('localVar = 1;',
'myfile.vm');
@@ -47,7 +47,7 @@ Example: compile and execute code that increments a global variable and sets a n
These globals are contained in the sandbox.
var util = require('util'),
- vm = require('javascript'),
+ vm = require('vm'),
sandbox = {
animal: 'cat',
count: 2
@@ -87,7 +87,7 @@ Running code does not have access to local scope, but does have access to the `g
Example of using `script.runInThisContext` to compile code once and run it multiple times:
- var vm = require('javascript');
+ var vm = require('vm');
globalVar = 0;
@@ -112,7 +112,7 @@ Example: compile code that increments a global variable and sets one, then execu
These globals are contained in the sandbox.
var util = require('util'),
- vm = require('javascript'),
+ vm = require('vm'),
sandbox = {
animal: 'cat',
count: 2