Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix docs for vm module
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Nov 16, 2010
1 parent 4737219 commit 702a923
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/vm.markdown
Expand Up @@ -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');
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand Down

0 comments on commit 702a923

Please sign in to comment.