doc: replace functions with arrow functions

PR-URL: https://github.com/nodejs/node/pull/6203
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
abouthiroppy
2016-04-15 07:23:19 +09:00
committed by James M Snell
parent 71801b773a
commit 9a9beefe23
2 changed files with 2 additions and 2 deletions

View File

@@ -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
```

View File

@@ -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