stable-version-regex
v3.0.0stable-version-regex
Provides a regex for a stable version string, consisting of major (>=1), minor and patch version.
Install
# npm
$ npm install stable-version-regex
# Yarn
$ yarn add stable-version-regex
Usage
const versionRegex = require('version-regex')
versionRegex.test('1.0.0') // true
versionRegex.test('21.0.0') // true
versionRegex.test('1.0.15') // true
versionRegex.test('1.13.14') // true
versionRegex.test('0.1.0') // false
versionRegex.test('0.12.0') // false
versionRegex.test('0.1.13') // false
versionRegex.test('1.01.0') // false
versionRegex.test('1.1.02') // false
Contribute
Are you missing something or want to contribute? Feel free to file an issue or a pull request! ⚙️
Support
Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:
If you want to send me a one time donation. The coffee is pretty good 😊.
Also for one time donations if you like PayPal.
Here you can support me regularly, which is great so I can steadily work on projects.
Thanks a lot for your support! ❤️
License
npm i stable-version-regex
Metadata
- MIT
- >=14
- Sebastian Landwehr
- released 1/8/2023