Skip to content

Commit

Permalink
doc: clarify slashes-appending in url module
Browse files Browse the repository at this point in the history
PR-URL: #9731
Ref: #9521
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Dec 21, 2016
1 parent 103b9fc commit ab4a98e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ The formatting process operates as follows:
[`Error`][] is thrown.
* For all string values of `urlObject.protocol` that *do not end* with an ASCII
colon (`:`) character, the literal string `:` will be appended to `result`.
* If either the `urlObject.slashes` property is true, `urlObject.protocol`
begins with one of `http`, `https`, `ftp`, `gopher`, or `file`, or
`urlObject.protocol` is `undefined`, the literal string `//` will be appended
to `result`.
* If either of the following conditions is true, then the literal string `//`
will be appended to `result`:
* `urlObject.slashes` property is true;
* `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or
`file`;
* If the value of the `urlObject.auth` property is truthy, and either
`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of
`urlObject.auth` will be coerced into a string and appended to `result`
Expand Down

0 comments on commit ab4a98e

Please sign in to comment.