package-json
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -23,4 +23,4 @@ 'use strict'; | ||
if (version === 'latest') { | ||
data = data.versions[data['dist-tags'].latest]; | ||
if (data['dist-tags'][version]) { | ||
data = data.versions[data['dist-tags'][version]]; | ||
} else if (version) { | ||
@@ -27,0 +27,0 @@ if (!data.versions[version]) { |
{ | ||
"name": "package-json", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Get the package.json of a package from the npm registry", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -35,3 +35,3 @@ # package-json [![Build Status](https://travis-ci.org/sindresorhus/package-json.svg?branch=master)](https://travis-ci.org/sindresorhus/package-json) | ||
You can optionally specify a version (e.g. `1.0.0`) or `latest`. If you don't specify a version you'll get the [main entry](http://registry.npmjs.org/pageres/) containing all versions. | ||
You can optionally specify a version (e.g. `1.0.0`) or a [dist tag](https://docs.npmjs.com/cli/dist-tag) such as `latest`. If you don't specify a version you'll get the [main entry](http://registry.npmjs.org/pageres/) containing all versions. | ||
@@ -38,0 +38,0 @@ The version can also be in any format supported by the [semver](https://www.npmjs.com/package/semver) module. For example: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5219