is-stable-version
v1.0.3
Published
Utility function to see if a SemVer version isn't a prerelease.
Downloads
19
Maintainers
Readme
is-stable-version
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.