UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

97 lines (96 loc) 5.9 kB
{ "_args": [ [ { "raw": "is-ssh@^1.3.0", "scope": null, "escapedName": "is-ssh", "name": "is-ssh", "rawSpec": "^1.3.0", "spec": ">=1.3.0 <2.0.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/normalize-ssh" ] ], "_from": "is-ssh@>=1.3.0 <2.0.0", "_id": "is-ssh@1.3.0", "_inCache": true, "_location": "/is-ssh", "_nodeVersion": "4.0.0", "_npmUser": { "name": "ionicabizau", "email": "bizauionica@gmail.com" }, "_npmVersion": "2.14.2", "_phantomChildren": {}, "_requested": { "raw": "is-ssh@^1.3.0", "scope": null, "escapedName": "is-ssh", "name": "is-ssh", "rawSpec": "^1.3.0", "spec": ">=1.3.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/normalize-ssh", "/parse-url" ], "_resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.0.tgz", "_shasum": "ebea1169a2614da392a63740366c3ce049d8dff6", "_shrinkwrap": null, "_spec": "is-ssh@^1.3.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/normalize-ssh", "author": { "name": "Ionică Bizău", "email": "bizauionica@gmail.com", "url": "http://ionicabizau.net" }, "bugs": { "url": "https://github.com/IonicaBizau/node-is-ssh/issues" }, "dependencies": { "protocols": "^1.1.0" }, "description": "Check if an input value is a ssh url or not.", "devDependencies": { "tester": "^1.3.1" }, "directories": { "example": "example", "test": "test" }, "dist": { "shasum": "ebea1169a2614da392a63740366c3ce049d8dff6", "tarball": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.0.tgz" }, "gitHead": "4d0e9b742fc3a4820d7b7c1e8c9003195913a345", "homepage": "https://github.com/IonicaBizau/node-is-ssh", "keywords": [ "ssh", "url", "check", "parser" ], "license": "MIT", "main": "lib/index.js", "maintainers": [ { "name": "ionicabizau", "email": "bizauionica@gmail.com" } ], "name": "is-ssh", "optionalDependencies": {}, "readme": "# is-ssh [![PayPal](https://img.shields.io/badge/%24-paypal-f39c12.svg)][paypal-donations] [![Version](https://img.shields.io/npm/v/is-ssh.svg)](https://www.npmjs.com/package/is-ssh) [![Downloads](https://img.shields.io/npm/dt/is-ssh.svg)](https://www.npmjs.com/package/is-ssh) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)\n\n> Check if an input value is a ssh url or not.\n\n## Installation\n\n```sh\n$ npm i --save is-ssh\n```\n\n## Example\n\n```js\n// Dependencies\nconst isSsh = require(\"is-ssh\");\n\n// Secure Shell Transport Protocol (SSH)\nconsole.log(isSsh(\"ssh://user@host.xz:port/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://user@host.xz/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://host.xz:port/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://host.xz/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://user@host.xz/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://host.xz/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://user@host.xz/~user/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://host.xz/~user/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"ssh://user@host.xz/~/path/to/repo.git\"));\n// true\n\nconsole.log(isSsh(\"ssh://host.xz/~/path/to/repo.git\"));\n// true\n\nconsole.log(isSsh(\"user@host.xz:/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"user@host.xz:~user/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"user@host.xz:path/to/repo.git\"));\n// true\n\nconsole.log(isSsh(\"host.xz:/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"host.xz:path/to/repo.git\"));\n// true\n\nconsole.log(isSsh(\"host.xz:~user/path/to/repo.git/\"));\n// true\n\nconsole.log(isSsh(\"rsync://host.xz/path/to/repo.git/\"));\n// true\n\n// Git Transport Protocol\nconsole.log(isSsh(\"git://host.xz/path/to/repo.git/\"));\n// false\n\nconsole.log(isSsh(\"git://host.xz/~user/path/to/repo.git/\"));\n// false\n\n// HTTP/S Transport Protocol\nconsole.log(isSsh(\"http://host.xz/path/to/repo.git/\"));\n// false\n\nconsole.log(isSsh(\"https://host.xz/path/to/repo.git/\"));\n// false\n\n// Local (Filesystem) Transport Protocol\nconsole.log(isSsh(\"/path/to/repo.git/\"));\n// false\n\nconsole.log(isSsh(\"path/to/repo.git/\"));\n// false\n\nconsole.log(isSsh(\"~/path/to/repo.git\"));\n// false\n\nconsole.log(isSsh(\"file:///path/to/repo.git/\"));\n// false\n\nconsole.log(isSsh(\"file://~/path/to/repo.git/\"));\n// false\n```\n\n## Documentation\n\n### `isSsh(input)`\nChecks if an input value is a ssh url or not.\n\n#### Params\n- **String|Array** `input`: The input url or an array of protocols.\n\n#### Return\n- **Boolean** `true` if the input is a ssh url, `false` otherwise.\n\n## How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n## Where is this library used?\nIf you are using this library in one of your projects, add it in this list. :sparkles:\n\n - [`git-up`](https://github.com/IonicaBizau/node-git-up)\n\n## License\n\n[MIT][license] © [Ionică Bizău][website]\n\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW\n[donate-now]: http://i.imgur.com/6cMbHOC.png\n\n[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(http%3A%2F%2Fionicabizau.net)&year=2015#license-mit\n[website]: http://ionicabizau.net\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+ssh://git@github.com/IonicaBizau/node-is-ssh.git" }, "scripts": { "test": "node test" }, "version": "1.3.0" }