Browse Source

doc: replace functions with arrow functions

PR-URL: https://github.com/nodejs/node/pull/6203
Reviewed-By: James M Snell <jasnell@gmail.com>
process-exit-stdio-flushing
abouthiroppy 9 years ago
committed by James M Snell
parent
commit
9a9beefe23
  1. 2
      doc/api/errors.markdown
  2. 2
      doc/api/vm.markdown

2
doc/api/errors.markdown

@ -410,7 +410,7 @@ allowable type. For example, passing a function to a parameter which expects a
string would be considered a TypeError.
```js
require('url').parse(function() { });
require('url').parse(() => { });
// throws TypeError, since it expected a string
```

2
doc/api/vm.markdown

@ -222,7 +222,7 @@ context. The primary use case is to get access to the V8 debug object:
```js
const Debug = vm.runInDebugContext('Debug');
Debug.scripts().forEach(function(script) { console.log(script.name); });
Debug.scripts().forEach((script) => { console.log(script.name); });
```
Note that the debug context and object are intrinsically tied to V8's debugger

Loading…
Cancel
Save