From 4df108e9459f57123c7f9a0bf370b972786d3da3 Mon Sep 17 00:00:00 2001 From: nettofarah Date: Mon, 22 Feb 2016 23:47:22 -0800 Subject: [PATCH] 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: nodejs#5380 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Evan Lucas --- lib/url.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/url.js b/lib/url.js index 6ffec081f64e48..dae3f6cd1d7c52 100644 --- a/lib/url.js +++ b/lib/url.js @@ -48,14 +48,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');