diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-02 04:44:32 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-04-04 12:30:36 +0300 |
commit | 237cbe10fb82ba6ec69b14193a4a970e184306e7 (patch) | |
tree | 8fbbac215e1f9afcac524404e766c4157d8da145 /doc/api/vm.md | |
parent | f7049a20068dc8a7e904b7cdd3d5b307b595dd3a (diff) | |
download | android-node-v8-237cbe10fb82ba6ec69b14193a4a970e184306e7.tar.gz android-node-v8-237cbe10fb82ba6ec69b14193a4a970e184306e7.tar.bz2 android-node-v8-237cbe10fb82ba6ec69b14193a4a970e184306e7.zip |
doc,tools: formalize, unify, codify default values
PR-URL: https://github.com/nodejs/node/pull/19737
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/vm.md')
-rw-r--r-- | doc/api/vm.md | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/doc/api/vm.md b/doc/api/vm.md index 3712fa4f2b..5797294ef9 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -159,7 +159,7 @@ const contextifiedSandbox = vm.createContext({ secret: 42 }); * `code` {string} JavaScript Module code to parse * `options` - * `url` {string} URL used in module resolution and stack traces. **Default**: + * `url` {string} URL used in module resolution and stack traces. **Default:** `'vm:module(i)'` where `i` is a context-specific ascending index. * `context` {Object} The [contextified][] object as returned by the `vm.createContext()` method, to compile and evaluate this Module in. @@ -542,11 +542,9 @@ changes: * `contextCodeGeneration` {Object} * `strings` {boolean} If set to false any calls to `eval` or function constructors (`Function`, `GeneratorFunction`, etc) will throw an - `EvalError`. - **Default**: `true`. + `EvalError`. **Default:** `true`. * `wasm` {boolean} If set to false any attempt to compile a WebAssembly - module will throw a `WebAssembly.CompileError`. - **Default**: `true`. + module will throw a `WebAssembly.CompileError`. **Default:** `true`. First contextifies the given `sandbox`, runs the compiled code contained by the `vm.Script` object within the created sandbox, and returns the result. @@ -640,11 +638,9 @@ changes: * `codeGeneration` {Object} * `strings` {boolean} If set to false any calls to `eval` or function constructors (`Function`, `GeneratorFunction`, etc) will throw an - `EvalError`. - **Default**: `true`. + `EvalError`. **Default:** `true`. * `wasm` {boolean} If set to false any attempt to compile a WebAssembly - module will throw a `WebAssembly.CompileError`. - **Default**: `true`. + module will throw a `WebAssembly.CompileError`. **Default:** `true`. If given a `sandbox` object, the `vm.createContext()` method will [prepare that sandbox][contextified] so that it can be used in calls to |