Skip to content

Commit 91001d3

Browse files
hiroppyMylesBorins
authored andcommitted
doc: replace functions with arrow functions
PR-URL: #6203 Reviewed-By: James M Snell <[email protected]>
1 parent 038801d commit 91001d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/api/errors.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ allowable type. For example, passing a function to a parameter which expects a
410410
string would be considered a TypeError.
411411

412412
```js
413-
require('url').parse(function() { });
413+
require('url').parse(() => { });
414414
// throws TypeError, since it expected a string
415415
```
416416

doc/api/vm.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ context. The primary use case is to get access to the V8 debug object:
222222

223223
```js
224224
const Debug = vm.runInDebugContext('Debug');
225-
Debug.scripts().forEach(function(script) { console.log(script.name); });
225+
Debug.scripts().forEach((script) => { console.log(script.name); });
226226
```
227227

228228
Note that the debug context and object are intrinsically tied to V8's debugger

0 commit comments

Comments
 (0)