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
Expand file treeCollapse file tree
Open diff view settings
Collapse file
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 number | Diff line number | Diff line change |
|---|
@@ -160,7 +160,6 @@ the value of another global variable, then execute the code multiple times. |
160 | 160 | The globals are contained in the `context` object. |
161 | 161 |
|
162 | 162 | ```js |
163 | | -const util = require('util'); |
164 | 163 | const vm = require('vm'); |
165 | 164 |
|
166 | 165 | const context = { |
@@ -235,7 +234,6 @@ the code multiple times in different contexts. The globals are set on and |
235 | 234 | contained within each individual `context`. |
236 | 235 |
|
237 | 236 | ```js |
238 | | -const util = require('util'); |
239 | 237 | const vm = require('vm'); |
240 | 238 |
|
241 | 239 | const script = new vm.Script('globalVar = "set"'); |
@@ -889,7 +887,6 @@ properties but also having the built-in objects and functions any standard |
889 | 887 | will remain unchanged. |
890 | 888 |
|
891 | 889 | ```js |
892 | | -const util = require('util'); |
893 | 890 | const vm = require('vm'); |
894 | 891 |
|
895 | 892 | global.globalVar = 3; |
@@ -994,7 +991,6 @@ The following example compiles and executes different scripts using a single |
994 | 991 | [contextified][] object: |
995 | 992 |
|
996 | 993 | ```js |
997 | | -const util = require('util'); |
998 | 994 | const vm = require('vm'); |
999 | 995 |
|
1000 | 996 | const contextObject = { globalVar: 1 }; |
@@ -1090,7 +1086,6 @@ The following example compiles and executes code that increments a global |
1090 | 1086 | variable and sets a new one. These globals are contained in the `contextObject`. |
1091 | 1087 |
|
1092 | 1088 | ```js |
1093 | | -const util = require('util'); |
1094 | 1089 | const vm = require('vm'); |
1095 | 1090 |
|
1096 | 1091 | const contextObject = { |
|