{
"_from": "npm-package-arg@6.1.1",
"_id": "npm-package-arg@6.1.1",
"_inBundle": false,
"_integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==",
"_location": "/npm/npm-package-arg",
"_phantomChildren": {},
"_requested": {
"escapedName": "npm-package-arg",
"fetchSpec": "6.1.1",
"name": "npm-package-arg",
"raw": "npm-package-arg@6.1.1",
"rawSpec": "6.1.1",
"registry": true,
"saveSpec": null,
"type": "version"
},
"_requiredBy": [
"#USER",
"/npm",
"/npm/init-package-json",
"/npm/libcipm",
"/npm/libnpm",
"/npm/libnpmaccess",
"/npm/libnpmpublish",
"/npm/libnpx",
"/npm/lock-verify",
"/npm/npm-pick-manifest",
"/npm/npm-registry-fetch",
"/npm/pacote"
],
"_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz",
"_shasum": "02168cb0a49a2b75bf988a28698de7b529df5cb7",
"_shrinkwrap": null,
"_spec": "npm-package-arg@6.1.1",
"_where": "/Users/isaacs/dev/npm/cli",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/npm/npm-package-arg/issues"
},
"bundleDependencies": false,
"dependencies": {
"hosted-git-info": "^2.7.1",
"osenv": "^0.1.5",
"semver": "^5.6.0",
"validate-npm-package-name": "^3.0.0"
},
"deprecated": false,
"description": "Parse the things that can be arguments to `npm install`",
"devDependencies": {
"standard": "^11.0.1",
"standard-version": "^4.4.0",
"tap": "^12.5.0",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
"directories": {
"test": "test"
},
"files": [
"npa.js"
],
"homepage": "https://github.com/npm/npm-package-arg",
"license": "ISC",
"main": "npa.js",
"name": "npm-package-arg",
"optionalDependencies": {},
"readme": "# npm-package-arg\n\n[](https://travis-ci.org/npm/npm-package-arg)\n\nParses package name and specifier passed to commands like `npm install` or\n`npm cache add`, or as found in `package.json` dependency sections.\n\n## EXAMPLES\n\n```javascript\nvar assert = require(\"assert\")\nvar npa = require(\"npm-package-arg\")\n\n// Pass in the descriptor, and it'll return an object\ntry {\n var parsed = npa(\"@bar/foo@1.2\")\n} catch (ex) {\n …\n}\n```\n\n## USING\n\n`var npa = require('npm-package-arg')`\n\n### var result = npa(*arg*[, *where*])\n\n* *arg* - a string that you might pass to `npm install`, like:\n`foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`,\n`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz`,\n`../foo/bar/` or `bar`. If the *arg* you provide doesn't have a specifier\npart, eg `foo` then the specifier will default to `latest`.\n* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`\n\n**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.\n\n### var result = npa.resolve(*name*, *spec*[, *where*])\n\n* *name* - The name of the module you want to install. For example: `foo` or `@bar/foo`.\n* *spec* - The specifier indicating where and how you can get this module. Something like:\n`1.2`, `^1.7.17`, `http://x.com/foo.tgz`, `git+https://github.com/user/foo`,\n`bitbucket:user/foo`, `file:foo.tar.gz` or `file:../foo/bar/`. If not\nincluded then the default is `latest`.\n* *where* - Optionally the path to resolve file paths relative to. Defaults to `process.cwd()`\n\n**Throws** if the package name is invalid, a dist-tag is invalid or a URL's protocol is not supported.\n\n## RESULT OBJECT\n\nThe objects that are returned by npm-package-arg contain the following\nkeys:\n\n* `type` - One of the following strings:\n * `git` - A git repo\n * `tag` - A tagged version, like `\"foo@latest\"`\n * `version` - A specific version number, like `\"foo@1.2.3\"`\n * `range` - A version range, like `\"foo@2.x\"`\n * `file` - A local `.tar.gz`, `.tar` or `.tgz` file.\n * `directory` - A local directory.\n * `remote` - An http url (presumably to a tgz)\n* `registry` - If true this specifier refers to a resource hosted on a\n registry. This is true for `tag`, `version` and `range` types.\n* `name` - If known, the `name` field expected in the resulting pkg.\n* `scope` - If a name is something like `@org/module` then the `scope`\n field will be set to `@org`. If it doesn't have a scoped name, then\n scope is `null`.\n* `escapedName` - A version of `name` escaped to match the npm scoped packages\n specification. Mostly used when making requests against a registry. When\n `name` is `null`, `escapedName` will also be `null`.\n* `rawSpec` - The specifier part that was parsed out in calls to `npa(arg)`,\n or the value of `spec` in calls to `npa.resolve(name, spec).\n* `saveSpec` - The normalized specifier, for saving to package.json files.\n `null` for registry dependencies.\n* `fetchSpec` - The version of the specifier to be used to fetch this\n resource. `null` for shortcuts to hosted git dependencies as there isn't\n just one URL to try with them.\n* `gitRange` - If set, this is a semver specifier to match against git tags with\n* `gitCommittish` - If set, this is the specific committish to use with a git dependency.\n* `hosted` - If `from === 'hosted'` then this will be a `hosted-git-info`\n object. This property is not included when serializing the object as\n JSON.\n* `raw` - The original un-modified string that was provided. If called as\n `npa.resolve(name, spec)` then this will be `name + '@' + spec`.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/npm-package-arg.git"
},
"scripts": {
"postrelease": "npm publish && git push --follow-tags",
"prerelease": "npm t",
"pretest": "standard",
"release": "standard-version -s",
"test": "tap --100 -J --coverage test/*.js",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
},
"version": "6.1.1"
}