{
"_from": "npm-pick-manifest@3.0.2",
"_id": "npm-pick-manifest@3.0.2",
"_inBundle": false,
"_integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==",
"_location": "/npm/npm-pick-manifest",
"_phantomChildren": {},
"_requested": {
"escapedName": "npm-pick-manifest",
"fetchSpec": "3.0.2",
"name": "npm-pick-manifest",
"raw": "npm-pick-manifest@3.0.2",
"rawSpec": "3.0.2",
"registry": true,
"saveSpec": null,
"type": "version"
},
"_requiredBy": [
"#USER",
"/npm",
"/npm/pacote"
],
"_resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz",
"_shasum": "f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7",
"_shrinkwrap": null,
"_spec": "npm-pick-manifest@3.0.2",
"_where": "/Users/claudiahdz/npm/cli",
"author": {
"email": "kzm@sykosomatic.org",
"name": "Kat Marchán"
},
"bugs": {
"url": "https://github.com/npm/npm-pick-manifest/issues"
},
"bundleDependencies": false,
"config": {
"nyc": {
"exclude": [
"node_modules/**",
"test/**"
]
}
},
"dependencies": {
"figgy-pudding": "^3.5.1",
"npm-package-arg": "^6.0.0",
"semver": "^5.4.1"
},
"deprecated": false,
"description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
"devDependencies": {
"nyc": "^13.1.0",
"standard": "^10.0.3",
"standard-version": "^4.4.0",
"tap": "^12.0.1",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
},
"files": [
"*.js"
],
"homepage": "https://github.com/npm/npm-pick-manifest#readme",
"keywords": [
"npm",
"package manager",
"semver"
],
"license": "ISC",
"main": "index.js",
"name": "npm-pick-manifest",
"optionalDependencies": {},
"readme": "# npm-pick-manifest [](https://npm.im/npm-pick-manifest) [](https://npm.im/npm-pick-manifest) [](https://travis-ci.org/npm/npm-pick-manifest) [](https://ci.appveyor.com/project/npm/npm-pick-manifest) [](https://coveralls.io/github/npm/npm-pick-manifest?branch=latest)\n\n[`npm-pick-manifest`](https://github.com/npm/npm-pick-manifest) is a standalone\nimplementation of [npm](https://npmjs.com)'s semver range resolution algorithm.\n\n## Install\n\n`$ npm install --save npm-pick-manifest`\n\n## Table of Contents\n\n* [Example](#example)\n* [Features](#features)\n* [Contributing](#contributing)\n* [API](#api)\n * [`pickManifest()`](#pick-manifest)\n\n### Example\n\n```javascript\nconst pickManifest = require('npm-pick-manifest')\n\nfetch('https://registry.npmjs.org/npm-pick-manifest').then(res => {\n return res.json()\n}).then(packument => {\n return pickManifest(packument, '^1.0.0')\n}) // get same manifest as npm would get if you `npm i npm-pick-manifest@^1.0.0`\n```\n\n### Features\n\n* Uses npm's exact semver resolution algorithm\n* Supports ranges, tags, and versions\n\n### Contributing\n\nThe npm-pick-manifest team enthusiastically welcomes contributions and project participation!\nThere's a bunch of things you can do if you want to contribute! The [Contributor\nGuide](CONTRIBUTING.md) has all the information you need for everything from\nreporting bugs to contributing entire new features. Please don't hesitate to\njump in if you'd like to, or even ask us questions if something isn't clear.\n\n### API\n\n#### <a name=\"pick-manifest\"></a> `> pickManifest(packument, selector, [opts]) -> manifest`\n\nReturns the manifest that matches `selector`, or throws an error.\n\nPackuments are anything returned by metadata URLs from the npm registry. That\nis, they're objects with the following shape (only fields used by\n`npm-pick-manifest` included):\n\n```javascript\n{\n name: 'some-package',\n 'dist-tags': {\n foo: '1.0.1'\n },\n versions: {\n '1.0.0': { version: '1.0.0' },\n '1.0.1': { version: '1.0.1' },\n '1.0.2': { version: '1.0.2' },\n '2.0.0': { version: '2.0.0' }\n }\n}\n```\n\nThe algorithm will follow npm's algorithm for semver resolution, and only `tag`,\n`range`, and `version` selectors are supported.\n\nThe function will throw `ETARGET` if there was no matching manifest, and\n`ENOVERSIONS` if the packument object has no valid versions in `versions`.\n\nIf `opts.defaultTag` is provided, it will be used instead of `latest`. That is,\nif that tag matches the selector, it will be used, even if a higher available\nversion matches the range.\n\nIf `opts.enjoyBy` is provided, it should be something that can be passed to `new\nDate(x)`, such as a `Date` object or a timestamp string. It will be used to\nfilter the selected versions such that only versions less than or equal to\n`enjoyBy` are considered.\n\nIf `opts.includeDeprecated` passed in as true, deprecated versions will be\nselected. By default, deprecated versions other than `defaultTag` are ignored.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/npm-pick-manifest.git"
},
"scripts": {
"postrelease": "npm publish && git push --follow-tags",
"prerelease": "npm t",
"pretest": "standard",
"release": "standard-version -s",
"test": "tap -J --100 --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": "3.0.2"
}