From 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 23 Feb 2023 19:34:56 +0100 Subject: Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated) --- school/node_modules/requires-port/index.js | 38 ------------------------------ 1 file changed, 38 deletions(-) delete mode 100644 school/node_modules/requires-port/index.js (limited to 'school/node_modules/requires-port/index.js') diff --git a/school/node_modules/requires-port/index.js b/school/node_modules/requires-port/index.js deleted file mode 100644 index 4f267b2..0000000 --- a/school/node_modules/requires-port/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -/** - * Check if we're required to add a port number. - * - * @see https://url.spec.whatwg.org/#default-port - * @param {Number|String} port Port number we need to check - * @param {String} protocol Protocol we need to check against. - * @returns {Boolean} Is it a default port for the given protocol - * @api private - */ -module.exports = function required(port, protocol) { - protocol = protocol.split(':')[0]; - port = +port; - - if (!port) return false; - - switch (protocol) { - case 'http': - case 'ws': - return port !== 80; - - case 'https': - case 'wss': - return port !== 443; - - case 'ftp': - return port !== 21; - - case 'gopher': - return port !== 70; - - case 'file': - return false; - } - - return port !== 0; -}; -- cgit