包详细信息

has-version

bconnorwhite22MIT1.0.0

Check if NPM has the version of a given package

has, version, npm, check

自述文件

has-version

NPM TypeScript Coverage Status GitHub Stars Twitter Follow


Check if NPM has the version of a given package.

Installation

yarn add has-version
npm install has-version

API

Usage

import hasVersion from "has-version";

hasVersion("chalk", "1.0.0").then((result) => {
  console.log(result); // true
});

hasVersion("chalk", "999.999.999").then((result) => {
  console.log(result); // false
});

hasVersion("a-package-that-doesnt-exist", "1.0.0").then((result) => {
  console.log(result); // undefined
});

Types

import hasVersion from "has-version";

function hasVersion(name: string, version: string): Promise<boolean | undefined>;


Dependenciesdependencies


Dev DependenciesDavid


License license

MIT

更新日志

1.0.0 (2020-09-30)