@@ -40,15 +40,15 @@ console.log(context.y); // 17
40
40
console .log (x); // 1; y is not defined.
41
41
```
42
42
43
- ## Class: vm.Script
43
+ ## Class: ` vm.Script `
44
44
<!-- YAML
45
45
added: v0.3.1
46
46
-->
47
47
48
48
Instances of the ` vm.Script ` class contain precompiled scripts that can be
49
49
executed in specific contexts.
50
50
51
- ### Constructor: new vm.Script(code\ [ , options\] )
51
+ ### Constructor: ` new vm.Script(code[, options]) `
52
52
<!-- YAML
53
53
added: v0.3.1
54
54
changes:
@@ -99,7 +99,7 @@ Creating a new `vm.Script` object compiles `code` but does not run it. The
99
99
compiled ` vm.Script ` can be run later multiple times. The ` code ` is not bound to
100
100
any global object; rather, it is bound before each run, just for that run.
101
101
102
- ### script.createCachedData()
102
+ ### ` script.createCachedData() `
103
103
<!-- YAML
104
104
added: v10.6.0
105
105
-->
@@ -126,7 +126,7 @@ script.runInThisContext();
126
126
const cacheWithX = script .createCachedData ();
127
127
```
128
128
129
- ### script.runInContext(contextifiedObject\ [ , options\] )
129
+ ### ` script.runInContext(contextifiedObject[, options]) `
130
130
<!-- YAML
131
131
added: v0.3.1
132
132
changes:
@@ -184,7 +184,7 @@ Using the `timeout` or `breakOnSigint` options will result in new event loops
184
184
and corresponding threads being started, which have a non-zero performance
185
185
overhead.
186
186
187
- ### script.runInNewContext(\ [ contextObject\ [ , options\]\] )
187
+ ### ` script.runInNewContext([contextObject[, options]]) `
188
188
<!-- YAML
189
189
added: v0.3.1
190
190
changes:
@@ -251,7 +251,7 @@ console.log(util.inspect(contexts));
251
251
// [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
252
252
```
253
253
254
- ### script.runInThisContext(\ [ options\] )
254
+ ### ` script.runInThisContext([options]) `
255
255
<!-- YAML
256
256
added: v0.3.1
257
257
changes:
@@ -297,7 +297,7 @@ console.log(globalVar);
297
297
// 1000
298
298
```
299
299
300
- ## Class: vm.Module
300
+ ## Class: ` vm.Module `
301
301
<!-- YAML
302
302
added: v13.0.0
303
303
-->
@@ -400,7 +400,7 @@ const contextifiedObject = vm.createContext({ secret: 42 });
400
400
})();
401
401
```
402
402
403
- ### module.dependencySpecifiers
403
+ ### ` module.dependencySpecifiers `
404
404
405
405
* {string[ ] }
406
406
@@ -410,7 +410,7 @@ to disallow any changes to it.
410
410
Corresponds to the ` [[RequestedModules]] ` field of [ Cyclic Module Record] [ ] s in
411
411
the ECMAScript specification.
412
412
413
- ### module.error
413
+ ### ` module.error `
414
414
415
415
* {any}
416
416
@@ -424,7 +424,7 @@ exception due to possible ambiguity with `throw undefined;`.
424
424
Corresponds to the ` [[EvaluationError]] ` field of [ Cyclic Module Record] [ ] s
425
425
in the ECMAScript specification.
426
426
427
- ### module.evaluate(\ [ options\] )
427
+ ### ` module.evaluate([options]) `
428
428
429
429
* ` options ` {Object}
430
430
* ` timeout ` {integer} Specifies the number of milliseconds to evaluate
@@ -454,7 +454,7 @@ This method cannot be called while the module is being evaluated
454
454
Corresponds to the [ Evaluate() concrete method] [ ] field of [ Cyclic Module
455
455
Record] [ ] s in the ECMAScript specification.
456
456
457
- ### module.link(linker)
457
+ ### ` module.link(linker) `
458
458
459
459
* ` linker ` {Function}
460
460
* ` specifier ` {string} The specifier of the requested module:
@@ -502,7 +502,7 @@ specification.
502
502
Corresponds to the [Link() concrete method][] field of [Cyclic Module
503
503
Record][]s in the ECMAScript specification.
504
504
505
- ### module.namespace
505
+ ### ` module.namespace`
506
506
507
507
* {Object }
508
508
@@ -512,7 +512,7 @@ The namespace object of the module. This is only available after linking
512
512
Corresponds to the [GetModuleNamespace][] abstract operation in the ECMAScript
513
513
specification.
514
514
515
- ### module .status
515
+ ### ` module.status`
516
516
517
517
* {string}
518
518
@@ -538,13 +538,13 @@ Other than `'errored'`, this status string corresponds to the specification's
538
538
`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
539
539
value that is not `undefined`.
540
540
541
- ### module.identifier
541
+ ### ` module.identifier`
542
542
543
543
* {string}
544
544
545
545
The identifier of the current module , as set in the constructor .
546
546
547
- ## Class: vm.SourceTextModule
547
+ ## Class: ` vm.SourceTextModule`
548
548
<!-- YAML
549
549
added: v9.6.0
550
550
-->
@@ -559,7 +559,7 @@ flag enabled.*
559
559
The `vm.SourceTextModule` class provides the [Source Text Module Record][] as
560
560
defined in the ECMAScript specification.
561
561
562
- ### Constructor: new vm.SourceTextModule (code \ [, options \])
562
+ ### Constructor: ` new vm.SourceTextModule (code [, options ])`
563
563
564
564
* `code` {string} JavaScript Module code to parse
565
565
* ` options`
@@ -621,7 +621,7 @@ const contextifiedObject = vm.createContext({ secret: 42 });
621
621
})();
622
622
` ` `
623
623
624
- ## Class: vm.SyntheticModule
624
+ ## Class: ` vm .SyntheticModule `
625
625
<!-- YAML
626
626
added: v13.0.0
627
627
-->
@@ -650,7 +650,7 @@ const module = new vm.SyntheticModule(['default'], function() {
650
650
// Use `module` in linking...
651
651
` ` `
652
652
653
- ### Constructor: new vm.SyntheticModule(exportNames, evaluateCallback\ [ , options\] )
653
+ ### Constructor: ` new vm.SyntheticModule (exportNames, evaluateCallback[, options]) `
654
654
<!-- YAML
655
655
added: v13.0.0
656
656
-->
@@ -670,7 +670,7 @@ Objects assigned to the exports of this instance may allow importers of
670
670
the module to access information outside the specified ` context` . Use
671
671
` vm .runInContext ()` to create objects in a specific context.
672
672
673
- ### syntheticModule.setExport(name, value)
673
+ ### ` syntheticModule .setExport (name, value)`
674
674
<!-- YAML
675
675
added: v13.0.0
676
676
-->
@@ -697,7 +697,7 @@ const vm = require('vm');
697
697
})();
698
698
` ` `
699
699
700
- ## vm.compileFunction(code\ [ , params\ [ , options\]\] )
700
+ ## ` vm .compileFunction (code[, params[, options]]) `
701
701
<!-- YAML
702
702
added: v10.10.0
703
703
-->
@@ -728,7 +728,7 @@ Compiles the given code into the provided context (if no context is
728
728
supplied, the current context is used), and returns it wrapped inside a
729
729
function with the given ` params` .
730
730
731
- ## vm.createContext(\ [ contextObject\ [ , options\]\] )
731
+ ## ` vm .createContext ([contextObject[, options]]) `
732
732
<!-- YAML
733
733
added: v0.3.1
734
734
changes:
@@ -795,7 +795,7 @@ context.
795
795
The provided ` name` and ` origin` of the context are made visible through the
796
796
Inspector API.
797
797
798
- ## vm.isContext(object)
798
+ ## ` vm .isContext (object)`
799
799
<!-- YAML
800
800
added: v0.11.7
801
801
-->
@@ -806,7 +806,7 @@ added: v0.11.7
806
806
Returns ` true ` if the given ` oject` object has been [contextified][] using
807
807
[` vm .createContext ()` ][].
808
808
809
- ## vm.runInContext(code, contextifiedObject\ [ , options\] )
809
+ ## ` vm .runInContext (code, contextifiedObject[, options]) `
810
810
<!-- YAML
811
811
added: v0.3.1
812
812
changes:
@@ -885,7 +885,7 @@ console.log(util.inspect(contextObject));
885
885
// { globalVar: 1024 }
886
886
` ` `
887
887
888
- ## vm.runInNewContext(code\ [ , contextObject\ [ , options\]\] )
888
+ ## ` vm .runInNewContext (code[, contextObject[, options]]) `
889
889
<!-- YAML
890
890
added: v0.3.1
891
891
changes:
@@ -982,7 +982,7 @@ console.log(util.inspect(contextObject));
982
982
// { animal: 'cat', count: 3, name: 'kitty' }
983
983
` ` `
984
984
985
- ## vm.runInThisContext(code\ [ , options\] )
985
+ ## ` vm .runInThisContext (code[, options]) `
986
986
<!-- YAML
987
987
added: v0.3.1
988
988
changes:
@@ -1116,7 +1116,7 @@ within which it can operate. The process of creating the V8 Context and
1116
1116
associating it with the ` contextObject` is what this document refers to as
1117
1117
"contextifying" the object.
1118
1118
1119
- ## Timeout limitations when using process.nextTick(), Promises, and queueMicrotask()
1119
+ ## Timeout limitations when using ` process .nextTick ()` , Promises, and ` queueMicrotask ()`
1120
1120
1121
1121
Because of the internal mechanics of how the ` process .nextTick ()` queue and
1122
1122
the microtask queue that underlies Promises are implemented within V8 and
0 commit comments