summaryrefslogtreecommitdiff
path: root/school/node_modules/requires-port
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-23 19:34:56 +0100
committerMinteck <contact@minteck.org>2023-02-23 19:34:56 +0100
commit3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch)
tree75be5fba4368472fb11c8015aee026b2b9a71888 /school/node_modules/requires-port
parent8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff)
downloadpluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz
pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2
pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'school/node_modules/requires-port')
-rw-r--r--school/node_modules/requires-port/.npmignore2
-rw-r--r--school/node_modules/requires-port/.travis.yml19
-rw-r--r--school/node_modules/requires-port/LICENSE22
-rw-r--r--school/node_modules/requires-port/README.md47
-rw-r--r--school/node_modules/requires-port/index.js38
-rw-r--r--school/node_modules/requires-port/package.json47
-rw-r--r--school/node_modules/requires-port/test.js98
7 files changed, 0 insertions, 273 deletions
diff --git a/school/node_modules/requires-port/.npmignore b/school/node_modules/requires-port/.npmignore
deleted file mode 100644
index ba2a97b..0000000
--- a/school/node_modules/requires-port/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-coverage
diff --git a/school/node_modules/requires-port/.travis.yml b/school/node_modules/requires-port/.travis.yml
deleted file mode 100644
index 0765106..0000000
--- a/school/node_modules/requires-port/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - "4"
- - "iojs"
- - "0.12"
- - "0.10"
-script:
- - "npm run test-travis"
-after_script:
- - "npm install coveralls@2 && cat coverage/lcov.info | coveralls"
-matrix:
- fast_finish: true
-notifications:
- irc:
- channels:
- - "irc.freenode.org#unshift"
- on_success: change
- on_failure: change
diff --git a/school/node_modules/requires-port/LICENSE b/school/node_modules/requires-port/LICENSE
deleted file mode 100644
index 6dc9316..0000000
--- a/school/node_modules/requires-port/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/school/node_modules/requires-port/README.md b/school/node_modules/requires-port/README.md
deleted file mode 100644
index 3effe75..0000000
--- a/school/node_modules/requires-port/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# requires-port
-
-[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](http://img.shields.io/npm/v/requires-port.svg?style=flat-square)](http://browsenpm.org/package/requires-port)[![Build Status](http://img.shields.io/travis/unshiftio/requires-port/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/requires-port)[![Dependencies](https://img.shields.io/david/unshiftio/requires-port.svg?style=flat-square)](https://david-dm.org/unshiftio/requires-port)[![Coverage Status](http://img.shields.io/coveralls/unshiftio/requires-port/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/requires-port?branch=master)[![IRC channel](http://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](http://webchat.freenode.net/?channels=unshift)
-
-The module name says it all, check if a protocol requires a given port.
-
-## Installation
-
-This module is intended to be used with browserify or Node.js and is distributed
-in the public npm registry. To install it simply run the following command from
-your CLI:
-
-```j
-npm install --save requires-port
-```
-
-## Usage
-
-The module exports it self as function and requires 2 arguments:
-
-1. The port number, can be a string or number.
-2. Protocol, can be `http`, `http:` or even `https://yomoma.com`. We just split
- it at `:` and use the first result. We currently accept the following
- protocols:
- - `http`
- - `https`
- - `ws`
- - `wss`
- - `ftp`
- - `gopher`
- - `file`
-
-It returns a boolean that indicates if protocol requires this port to be added
-to your URL.
-
-```js
-'use strict';
-
-var required = require('requires-port');
-
-console.log(required('8080', 'http')) // true
-console.log(required('80', 'http')) // false
-```
-
-# License
-
-MIT
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;
-};
diff --git a/school/node_modules/requires-port/package.json b/school/node_modules/requires-port/package.json
deleted file mode 100644
index c113b4b..0000000
--- a/school/node_modules/requires-port/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "requires-port",
- "version": "1.0.0",
- "description": "Check if a protocol requires a certain port number to be added to an URL.",
- "main": "index.js",
- "scripts": {
- "100%": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
- "test-travis": "istanbul cover _mocha --report lcovonly -- test.js",
- "coverage": "istanbul cover _mocha -- test.js",
- "watch": "mocha --watch test.js",
- "test": "mocha test.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/unshiftio/requires-port"
- },
- "keywords": [
- "port",
- "require",
- "http",
- "https",
- "ws",
- "wss",
- "gopher",
- "file",
- "ftp",
- "requires",
- "requried",
- "portnumber",
- "url",
- "parsing",
- "validation",
- "cows"
- ],
- "author": "Arnout Kazemier",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/unshiftio/requires-port/issues"
- },
- "homepage": "https://github.com/unshiftio/requires-port",
- "devDependencies": {
- "assume": "1.3.x",
- "istanbul": "0.4.x",
- "mocha": "2.3.x",
- "pre-commit": "1.1.x"
- }
-}
diff --git a/school/node_modules/requires-port/test.js b/school/node_modules/requires-port/test.js
deleted file mode 100644
index 93a0c74..0000000
--- a/school/node_modules/requires-port/test.js
+++ /dev/null
@@ -1,98 +0,0 @@
-describe('requires-port', function () {
- 'use strict';
-
- var assume = require('assume')
- , required = require('./');
-
- it('is exported as a function', function () {
- assume(required).is.a('function');
- });
-
- it('does not require empty ports', function () {
- assume(required('', 'http')).false();
- assume(required('', 'wss')).false();
- assume(required('', 'ws')).false();
- assume(required('', 'cowsack')).false();
- });
-
- it('assumes true for unknown protocols',function () {
- assume(required('808', 'foo')).true();
- assume(required('80', 'bar')).true();
- });
-
- it('never requires port numbers for file', function () {
- assume(required(8080, 'file')).false();
- });
-
- it('does not require port 80 for http', function () {
- assume(required('80', 'http')).false();
- assume(required(80, 'http')).false();
- assume(required(80, 'http://')).false();
- assume(required(80, 'http://www.google.com')).false();
-
- assume(required('8080', 'http')).true();
- assume(required(8080, 'http')).true();
- assume(required(8080, 'http://')).true();
- assume(required(8080, 'http://www.google.com')).true();
- });
-
- it('does not require port 80 for ws', function () {
- assume(required('80', 'ws')).false();
- assume(required(80, 'ws')).false();
- assume(required(80, 'ws://')).false();
- assume(required(80, 'ws://www.google.com')).false();
-
- assume(required('8080', 'ws')).true();
- assume(required(8080, 'ws')).true();
- assume(required(8080, 'ws://')).true();
- assume(required(8080, 'ws://www.google.com')).true();
- });
-
- it('does not require port 443 for https', function () {
- assume(required('443', 'https')).false();
- assume(required(443, 'https')).false();
- assume(required(443, 'https://')).false();
- assume(required(443, 'https://www.google.com')).false();
-
- assume(required('8080', 'https')).true();
- assume(required(8080, 'https')).true();
- assume(required(8080, 'https://')).true();
- assume(required(8080, 'https://www.google.com')).true();
- });
-
- it('does not require port 443 for wss', function () {
- assume(required('443', 'wss')).false();
- assume(required(443, 'wss')).false();
- assume(required(443, 'wss://')).false();
- assume(required(443, 'wss://www.google.com')).false();
-
- assume(required('8080', 'wss')).true();
- assume(required(8080, 'wss')).true();
- assume(required(8080, 'wss://')).true();
- assume(required(8080, 'wss://www.google.com')).true();
- });
-
- it('does not require port 21 for ftp', function () {
- assume(required('21', 'ftp')).false();
- assume(required(21, 'ftp')).false();
- assume(required(21, 'ftp://')).false();
- assume(required(21, 'ftp://www.google.com')).false();
-
- assume(required('8080', 'ftp')).true();
- assume(required(8080, 'ftp')).true();
- assume(required(8080, 'ftp://')).true();
- assume(required(8080, 'ftp://www.google.com')).true();
- });
-
- it('does not require port 70 for gopher', function () {
- assume(required('70', 'gopher')).false();
- assume(required(70, 'gopher')).false();
- assume(required(70, 'gopher://')).false();
- assume(required(70, 'gopher://www.google.com')).false();
-
- assume(required('8080', 'gopher')).true();
- assume(required(8080, 'gopher')).true();
- assume(required(8080, 'gopher://')).true();
- assume(required(8080, 'gopher://www.google.com')).true();
- });
-});