mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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:
1 parent
28baed9c0f
commit
6178ec2192
2 files changed
+2
-2
No files matched your search
@@ -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
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user