Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 045beee

Browse files
hiroppyMyles Borins
authored and
Myles Borins
committedMay 17, 2016
doc: replace functions with arrow functions
PR-URL: #6203 Reviewed-By: James M Snell <[email protected]>
1 parent e1817e4 commit 045beee

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
@@ -213,7 +213,7 @@ context. The primary use case is to get access to the V8 debug object:
213213

214214
```js
215215
const Debug = vm.runInDebugContext('Debug');
216-
Debug.scripts().forEach(function(script) { console.log(script.name); });
216+
Debug.scripts().forEach((script) => { console.log(script.name); });
217217
```
218218

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

0 commit comments

Comments
 (0)
Please sign in to comment.