GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: removed unnecessary util imports from vm examples · nodejs/node@b5dcfbf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • vm.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/vm.md‎

Copy file name to clipboardExpand all lines: doc/api/vm.md
-5Lines changed: 0 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ the value of another global variable, then execute the code multiple times.
160160
The globals are contained in the `context` object.
161161

162162
```js
163-
const util = require('util');
164163
const vm = require('vm');
165164

166165
const context = {
@@ -235,7 +234,6 @@ the code multiple times in different contexts. The globals are set on and
235234
contained within each individual `context`.
236235

237236
```js
238-
const util = require('util');
239237
const vm = require('vm');
240238

241239
const script = new vm.Script('globalVar = "set"');
@@ -889,7 +887,6 @@ properties but also having the built-in objects and functions any standard
889887
will remain unchanged.
890888

891889
```js
892-
const util = require('util');
893890
const vm = require('vm');
894891
895892
global.globalVar = 3;
@@ -994,7 +991,6 @@ The following example compiles and executes different scripts using a single
994991
[contextified][] object:
995992
996993
```js
997-
const util = require('util');
998994
const vm = require('vm');
999995
1000996
const contextObject = { globalVar: 1 };
@@ -1090,7 +1086,6 @@ The following example compiles and executes code that increments a global
10901086
variable and sets a new one. These globals are contained in the `contextObject`.
10911087
10921088
```js
1093-
const util = require('util');
10941089
const vm = require('vm');
10951090
10961091
const contextObject = {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.