@zkochan/pnpm
Version:
Fast, disk space efficient package manager
115 lines (114 loc) • 10.9 kB
JSON
{
"_args": [
[
{
"raw": "psl@^1.1.24",
"scope": null,
"escapedName": "psl",
"name": "psl",
"rawSpec": "^1.1.24",
"spec": ">=1.1.24 <2.0.0",
"type": "range"
},
"/home/zkochan/src/pnpm/packages/pnpm/node_modules/tough-cookie"
]
],
"_from": "psl@>=1.1.24 <2.0.0",
"_id": "psl@1.1.29",
"_inCache": true,
"_location": "/psl",
"_nodeVersion": "10.6.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/psl_1.1.29_1533299411879_0.5773351184487232"
},
"_npmUser": {
"name": "lupomontero",
"email": "lupomontero@gmail.com"
},
"_npmVersion": "6.1.0",
"_phantomChildren": {},
"_requested": {
"raw": "psl@^1.1.24",
"scope": null,
"escapedName": "psl",
"name": "psl",
"rawSpec": "^1.1.24",
"spec": ">=1.1.24 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/tough-cookie"
],
"_resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
"_shasum": "60f580d360170bb722a797cc704411e6da850c67",
"_shrinkwrap": null,
"_spec": "psl@^1.1.24",
"_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/tough-cookie",
"author": {
"name": "Lupo Montero"
},
"bugs": {
"url": "https://github.com/wrangr/psl/issues"
},
"dependencies": {},
"description": "Domain name parser based on the Public Suffix List",
"devDependencies": {
"JSONStream": "^1.3.3",
"browserify": "^16.2.2",
"eslint": "^5.2.0",
"eslint-config-hapi": "^12.0.0",
"eslint-plugin-hapi": "^4.1.0",
"event-stream": "^3.3.4",
"karma": "^2.0.5",
"karma-browserify": "^5.3.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"mocha": "^5.2.0",
"phantomjs-prebuilt": "^2.1.16",
"request": "^2.87.0",
"uglify-js": "^3.4.6",
"watchify": "^3.11.0"
},
"directories": {},
"dist": {
"integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==",
"shasum": "60f580d360170bb722a797cc704411e6da850c67",
"tarball": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
"fileCount": 11,
"unpackedSize": 550402,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbZErUCRA9TVsSAnZWagAAKnUQAJzjAsz6o8LyofA7V4sW\n05AiEbMhn0Y2i9El9TTK8eq7ZX1OdoIc6jnpbIr+VuRPT0waH5xdXKHzulsk\nQrA9GBeeTN57TLRtd/tl7bi5k6CleaiHwA+xwOvr1BaqYEIyAMqlsL0qxKB0\nD+ugemBqaxslghQNpKsFeQej8q+h8D5NuDd2rKVbcLsbltx17aTdctkvDaik\n4D3eUn4ZaS6waHn8uIJcVdoZHdlWLTovT4J7sJ1taNjCD/3nRdGj6xFbDaom\nHiiH2pjU9AHvD0Hqhm/O9ScoART/n1wYCXlfI9Pn7yCr4gLucAdIX/62cXr7\nIJU0p1lpUUbDK6jpfgDyQxW3oINSWhySyHU/X5h0bFcT2ZGhE9Rm6V1bVGBi\nE9CFh61iseAhg4vBbDvS7ifSFDSbQc45S04USRH1l5JMIf0Hn15W/UEiZeXU\nc9R8A910M4bE/kW9EjM+WlBWTDcyxtrhg0Cez19ywB1S/O5HznMriB7TO17H\ntD2f5VCU7LeVAnTLqxv8DWgYgMU8RAD9u2U9izjL+5ZSy4YMjNso2T3rJ7Y8\ndVoRhvfEopVj+Sf0o5XicSqjpbPAZaI6GS1/ZpYSNTea8vydjfKhIvM2RATR\nd/8xpgjBTuEMCptIiQU/KC6t4JfN/SvCrssmdFBxAvJuw7biDwjMpf3gIqwB\nl8et\r\n=ClWM\r\n-----END PGP SIGNATURE-----\r\n"
},
"gitHead": "8622fcc3a5a87ed24eb6c85420482d8c46763005",
"homepage": "https://github.com/wrangr/psl#readme",
"keywords": [
"publicsuffix",
"publicsuffixlist"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "lupomontero",
"email": "lupo@e-noise.com"
}
],
"name": "psl",
"optionalDependencies": {},
"readme": "# psl (Public Suffix List)\n\n[](https://nodei.co/npm/psl/)\n\n[](https://greenkeeper.io/)\n[](https://travis-ci.org/wrangr/psl)\n[](https://david-dm.org/wrangr/psl#info=devDependencies)\n\n`psl` is a `JavaScript` domain name parser based on the\n[Public Suffix List](https://publicsuffix.org/).\n\nThis implementation is tested against the\n[test data hosted by Mozilla](http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1)\nand kindly provided by [Comodo](https://www.comodo.com/).\n\n\n## What is the Public Suffix List?\n\nThe Public Suffix List is a cross-vendor initiative to provide an accurate list\nof domain name suffixes.\n\nThe Public Suffix List is an initiative of the Mozilla Project, but is\nmaintained as a community resource. It is available for use in any software,\nbut was originally created to meet the needs of browser manufacturers.\n\nA \"public suffix\" is one under which Internet users can directly register names.\nSome examples of public suffixes are \".com\", \".co.uk\" and \"pvt.k12.wy.us\". The\nPublic Suffix List is a list of all known public suffixes.\n\nSource: http://publicsuffix.org\n\n\n## Installation\n\n### Node.js\n\n```sh\nnpm install --save psl\n```\n\n### Browser\n\nDownload [psl.min.js](https://raw.githubusercontent.com/wrangr/psl/master/dist/psl.min.js)\nand include it in a script tag.\n\n```html\n<script src=\"psl.min.js\"></script>\n```\n\nThis script is browserified and wrapped in a [umd](https://github.com/umdjs/umd)\nwrapper so you should be able to use it standalone or together with a module\nloader.\n\n## API\n\n### `psl.parse(domain)`\n\nParse domain based on Public Suffix List. Returns an `Object` with the following\nproperties:\n\n* `tld`: Top level domain (this is the _public suffix_).\n* `sld`: Second level domain (the first private part of the domain name).\n* `domain`: The domain name is the `sld` + `tld`.\n* `subdomain`: Optional parts left of the domain.\n\n#### Example:\n\n```js\nvar psl = require('psl');\n\n// Parse domain without subdomain\nvar parsed = psl.parse('google.com');\nconsole.log(parsed.tld); // 'com'\nconsole.log(parsed.sld); // 'google'\nconsole.log(parsed.domain); // 'google.com'\nconsole.log(parsed.subdomain); // null\n\n// Parse domain with subdomain\nvar parsed = psl.parse('www.google.com');\nconsole.log(parsed.tld); // 'com'\nconsole.log(parsed.sld); // 'google'\nconsole.log(parsed.domain); // 'google.com'\nconsole.log(parsed.subdomain); // 'www'\n\n// Parse domain with nested subdomains\nvar parsed = psl.parse('a.b.c.d.foo.com');\nconsole.log(parsed.tld); // 'com'\nconsole.log(parsed.sld); // 'foo'\nconsole.log(parsed.domain); // 'foo.com'\nconsole.log(parsed.subdomain); // 'a.b.c.d'\n```\n\n### `psl.get(domain)`\n\nGet domain name, `sld` + `tld`. Returns `null` if not valid.\n\n#### Example:\n\n```js\nvar psl = require('psl');\n\n// null input.\npsl.get(null); // null\n\n// Mixed case.\npsl.get('COM'); // null\npsl.get('example.COM'); // 'example.com'\npsl.get('WwW.example.COM'); // 'example.com'\n\n// Unlisted TLD.\npsl.get('example'); // null\npsl.get('example.example'); // 'example.example'\npsl.get('b.example.example'); // 'example.example'\npsl.get('a.b.example.example'); // 'example.example'\n\n// TLD with only 1 rule.\npsl.get('biz'); // null\npsl.get('domain.biz'); // 'domain.biz'\npsl.get('b.domain.biz'); // 'domain.biz'\npsl.get('a.b.domain.biz'); // 'domain.biz'\n\n// TLD with some 2-level rules.\npsl.get('uk.com'); // null);\npsl.get('example.uk.com'); // 'example.uk.com');\npsl.get('b.example.uk.com'); // 'example.uk.com');\n\n// More complex TLD.\npsl.get('c.kobe.jp'); // null\npsl.get('b.c.kobe.jp'); // 'b.c.kobe.jp'\npsl.get('a.b.c.kobe.jp'); // 'b.c.kobe.jp'\npsl.get('city.kobe.jp'); // 'city.kobe.jp'\npsl.get('www.city.kobe.jp'); // 'city.kobe.jp'\n\n// IDN labels.\npsl.get('食狮.com.cn'); // '食狮.com.cn'\npsl.get('食狮.公司.cn'); // '食狮.公司.cn'\npsl.get('www.食狮.公司.cn'); // '食狮.公司.cn'\n\n// Same as above, but punycoded.\npsl.get('xn--85x722f.com.cn'); // 'xn--85x722f.com.cn'\npsl.get('xn--85x722f.xn--55qx5d.cn'); // 'xn--85x722f.xn--55qx5d.cn'\npsl.get('www.xn--85x722f.xn--55qx5d.cn'); // 'xn--85x722f.xn--55qx5d.cn'\n```\n\n### `psl.isValid(domain)`\n\nCheck whether a domain has a valid Public Suffix. Returns a `Boolean` indicating\nwhether the domain has a valid Public Suffix.\n\n#### Example\n\n```js\nvar psl = require('psl');\n\npsl.isValid('google.com'); // true\npsl.isValid('www.google.com'); // true\npsl.isValid('x.yz'); // false\n```\n\n\n## Testing and Building\n\nTest are written using [`mocha`](https://mochajs.org/) and can be\nrun in two different environments: `node` and `phantomjs`.\n\n```sh\n# This will run `eslint`, `mocha` and `karma`.\nnpm test\n\n# Individual test environments\n# Run tests in node only.\n./node_modules/.bin/mocha test\n# Run tests in phantomjs only.\n./node_modules/.bin/karma start ./karma.conf.js --single-run\n\n# Build data (parse raw list) and create dist files\nnpm run build\n```\n\nFeel free to fork if you see possible improvements!\n\n\n## Acknowledgements\n\n* Mozilla Foundation's [Public Suffix List](https://publicsuffix.org/)\n* Thanks to Rob Stradling of [Comodo](https://www.comodo.com/) for providing\n test data.\n* Inspired by [weppos/publicsuffix-ruby](https://github.com/weppos/publicsuffix-ruby)\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Lupo Montero <lupomontero@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/wrangr/psl.git"
},
"scripts": {
"build": "browserify ./index.js --standalone=psl > ./dist/psl.js",
"postbuild": "cat ./dist/psl.js | uglifyjs -c -m > ./dist/psl.min.js",
"prebuild": "node ./data/build.js",
"pretest": "eslint .",
"test": "mocha test && karma start ./karma.conf.js --single-run",
"watch": "mocha test --watch"
},
"version": "1.1.29"
}