Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 701f536

Browse filesBrowse files
MarkTiedemannMylesBorins
authored andcommitted
doc: remove superfluous URL require statement
Since v10.0.0, the `URL` class is available on the global object, so using a `require` statement to access it is no longer necessary. PR-URL: #20364 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
1 parent d9bc921 commit 701f536
Copy full SHA for 701f536

File tree

Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
-2Lines changed: 0 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ and a `base` is provided, it is advised to validate that the `origin` of
132132
the `URL` object is what is expected.
133133

134134
```js
135-
const { URL } = require('url');
136-
137135
let myURL = new URL('http://anotherExample.org/', 'https://example.org/');
138136
// http://anotherexample.org/
139137

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.