Regular expression for matching chronver versions.
$ npm i @chronver/regex
@chronver/regex
is an evergreen module. 🌲 This module requires an Active LTS Node version (v12.0.0+).
// Import the default export for validation helper usage
import validateChronver from "@chronver/regex";
validateChronver("1970.01.01");
// => true
validateChronver("1970.01.01-alpha.10.beta+build.unicorn.rainbow");
// => true
// Or, export the regex to use directly
import { chronverRegex } from "@chronver/regex";
chronverRegex.test("1970.01.01");
// => true
chronverRegex.test("1970.01.01-alpha.10.beta+build.unicorn.rainbow");
// => true
Just a regular expression. 😰 You better know what you are doing.
# Run all tests, sequentially
$ npm test
# Test dependencies for latest versions
$ npm run test:dependencies
# Lint "src" directory
$ npm run test:typescript
# Test this module
$ npm run test:assert
MIT © netop://ウエハ