{ "_id": "requires-port", "_rev": "13-164915816c888506fc15ef5b22dddce0", "name": "requires-port", "description": "Check if a protocol requires a certain port number to be added to an URL.", "dist-tags": { "latest": "1.0.0" }, "versions": { "0.0.0": { "name": "requires-port", "version": "0.0.0", "description": "Check if a protocol requires a certain port number to be added to an URL.", "main": "index.js", "scripts": { "test": "mocha --reporter spec --ui bdd test.js", "watch": "mocha --watch --reporter spec --ui bdd test.js", "coverage": "istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js", "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js" }, "repository": { "type": "git", "url": "https://github.com/unshiftio/requries-port" }, "keywords": [ "port", "require", "http", "https", "ws", "wss", "gopher", "file", "ftp", "requires", "requried", "portnumber", "url", "parsing", "validation", "cows" ], "author": { "name": "Arnout Kazemier" }, "license": "MIT", "bugs": { "url": "https://github.com/unshiftio/requries-port/issues" }, "homepage": "https://github.com/unshiftio/requries-port", "devDependencies": { "assume": "0.0.x", "istanbul": "0.3.x", "mocha": "1.21.x", "pre-commit": "0.0.x" }, "gitHead": "cdd88d620507e79c4b5d57c3b353d5da8ac66988", "_id": "requires-port@0.0.0", "_shasum": "d9914dce124d3d5e75ceda38ca5434069f7132b3", "_from": ".", "_npmVersion": "1.4.28", "_npmUser": { "name": "V1", "email": "info@3rd-Eden.com" }, "maintainers": [ { "name": "V1", "email": "info@3rd-Eden.com" } ], "dist": { "shasum": "d9914dce124d3d5e75ceda38ca5434069f7132b3", "tarball": "https://registry.npmjs.org/requires-port/-/requires-port-0.0.0.tgz" }, "directories": {} }, "0.0.1": { "name": "requires-port", "version": "0.0.1", "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": "mocha test.js", "watch": "mocha --watch test.js", "coverage": "istanbul cover ./node_modules/.bin/_mocha -- test.js", "test-travis": "istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js" }, "repository": { "type": "git", "url": "git+https://github.com/unshiftio/requires-port.git" }, "keywords": [ "port", "require", "http", "https", "ws", "wss", "gopher", "file", "ftp", "requires", "requried", "portnumber", "url", "parsing", "validation", "cows" ], "author": { "name": "Arnout Kazemier" }, "license": "MIT", "bugs": { "url": "https://github.com/unshiftio/requires-port/issues" }, "homepage": "https://github.com/unshiftio/requires-port", "devDependencies": { "assume": "1.1.x", "istanbul": "0.3.x", "mocha": "2.1.x", "pre-commit": "1.0.x" }, "gitHead": "d6235df7aa7e8d08e9ac72c842e1e2c6c366376f", "_id": "requires-port@0.0.1", "_shasum": "4b4414411d9df7c855995dd899a8c78a2951c16d", "_from": ".", "_npmVersion": "2.9.1", "_nodeVersion": "0.12.3", "_npmUser": { "name": "3rdeden", "email": "npm@3rd-Eden.com" }, "maintainers": [ { "name": "v1", "email": "info@3rd-Eden.com" }, { "name": "3rdeden", "email": "npm@3rd-Eden.com" } ], "dist": { "shasum": "4b4414411d9df7c855995dd899a8c78a2951c16d", "tarball": "https://registry.npmjs.org/requires-port/-/requires-port-0.0.1.tgz" }, "directories": {} }, "1.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": "git+https://github.com/unshiftio/requires-port.git" }, "keywords": [ "port", "require", "http", "https", "ws", "wss", "gopher", "file", "ftp", "requires", "requried", "portnumber", "url", "parsing", "validation", "cows" ], "author": { "name": "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" }, "gitHead": "3a552b935dd2ddba8f2ddf9096932f0f2024edfd", "_id": "requires-port@1.0.0", "_shasum": "925d2601d39ac485e091cf0da5c6e694dc3dcaff", "_from": ".", "_npmVersion": "2.14.3", "_nodeVersion": "0.12.3", "_npmUser": { "name": "3rdeden", "email": "npm@3rd-Eden.com" }, "maintainers": [ { "name": "v1", "email": "info@3rd-Eden.com" }, { "name": "3rdeden", "email": "npm@3rd-Eden.com" } ], "dist": { "shasum": "925d2601d39ac485e091cf0da5c6e694dc3dcaff", "tarball": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" }, "directories": {} } }, "readme": "# requires-port\n\n[![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)\n\nThe module name says it all, check if a protocol requires a given port.\n\n## Installation\n\nThis module is intended to be used with browserify or Node.js and is distributed\nin the public npm registry. To install it simply run the following command from\nyour CLI:\n\n```j\nnpm install --save requires-port\n```\n\n## Usage\n\nThe module exports it self as function and requires 2 arguments:\n\n1. The port number, can be a string or number.\n2. Protocol, can be `http`, `http:` or even `https://yomoma.com`. We just split\n it at `:` and use the first result. We currently accept the following\n protocols:\n - `http`\n - `https`\n - `ws`\n - `wss`\n - `ftp`\n - `gopher`\n - `file`\n\nIt returns a boolean that indicates if protocol requires this port to be added\nto your URL.\n\n```js\n'use strict';\n\nvar required = require('requires-port');\n\nconsole.log(required('8080', 'http')) // true\nconsole.log(required('80', 'http')) // false\n```\n\n# License\n\nMIT\n", "maintainers": [ { "email": "npm@3rd-Eden.com", "name": "v1" }, { "email": "npm@3rd-Eden.com", "name": "3rdeden" } ], "time": { "modified": "2019-01-29T03:01:28.972Z", "created": "2014-11-07T11:03:17.791Z", "0.0.0": "2014-11-07T11:03:17.791Z", "0.0.1": "2015-05-26T09:31:22.078Z", "1.0.0": "2015-10-30T14:42:33.794Z" }, "homepage": "https://github.com/unshiftio/requires-port", "keywords": [ "port", "require", "http", "https", "ws", "wss", "gopher", "file", "ftp", "requires", "requried", "portnumber", "url", "parsing", "validation", "cows" ], "repository": { "type": "git", "url": "git+https://github.com/unshiftio/requires-port.git" }, "author": { "name": "Arnout Kazemier" }, "bugs": { "url": "https://github.com/unshiftio/requires-port/issues" }, "license": "MIT", "readmeFilename": "README.md", "users": { "mojaray2k": true, "staydan": true, "papasavva": true } }