From 237cbe10fb82ba6ec69b14193a4a970e184306e7 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Mon, 2 Apr 2018 04:44:32 +0300 Subject: doc,tools: formalize, unify, codify default values PR-URL: https://github.com/nodejs/node/pull/19737 Reviewed-By: Gus Caplan Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- doc/api/vm.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'doc/api/vm.md') 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 -- cgit v1.2.3