is-stable-version
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

is-stable-version

CI Badge NPM Badge

Utility function to see if a SemVer version isn't a prerelease.

Installation

Install is-stable-version through npm:

$ npm install is-stable-version

Usage

import isStableVersion from "is-stable-version";

isStableVersion("1.0.0"); //=> true
isStableVersion("1.0.0-alpha"); //=> false

isStableVersion("=v1.0.0"); //=> true
isStableVersion("=v1.0.0-alpha"); //=> false

isStableVersion(" = v 1.0.0"); //=> throws RangeError
isStableVersion(" = v 1.0.0", { loose: true }); //=> true

isStableVersion("1.0.0alpha"); //=> throws RangeError
isStableVersion("1.0.0alpha", { loose: true }); //=> false

License

This package is available as open source under the terms of the MIT License.

Package Sidebar

Install

npm i is-stable-version

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

6.62 kB

Total Files

5

Last publish

Collaborators

  • seancroach