From: nettofarah Date: Tue, 23 Feb 2016 07:47:22 +0000 (-0800) Subject: url: group slashed protocols by protocol name X-Git-Tag: v4.4.1~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dff7091fce47b7686aa029fd5c2a49e884e9ea86;p=platform%2Fupstream%2Fnodejs.git url: group slashed protocols by protocol name Reorder slashed protocols so they are grouped by protocol name. This is done so it doesn't look like we're duplicating protocol names at the bottom of the list. PR-URL: https://github.com/nodejs/node/pull/5380 Reviewed-By: Evan Lucas --- diff --git a/lib/url.js b/lib/url.js index d9be77a..016acd0 100644 --- a/lib/url.js +++ b/lib/url.js @@ -65,14 +65,14 @@ const hostlessProtocol = { // protocols that always contain a // bit. const slashedProtocol = { 'http': true, - 'https': true, - 'ftp': true, - 'gopher': true, - 'file': true, 'http:': true, + 'https': true, 'https:': true, + 'ftp': true, 'ftp:': true, + 'gopher': true, 'gopher:': true, + 'file': true, 'file:': true }; const querystring = require('querystring');