1.0.3 • Published 3 years ago

is-stable-version v1.0.3

Weekly downloads
172
License
MIT
Repository
github
Last release
3 years ago

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.