Show More
Commit Commit message Age Author Refs
r4:59116b71ecc0
TypeScript refactor
0
r3:9e489ef908bc
Improved regex
0
r2:533b6202f76c
Upgraded devDependencies and added type checking
0
r1:9f3ea23e40e9
Updated deps
0
r0:ac59b97cb882
Initial commit
0
< 1 >

chronver-regex

Regular expression for matching chronver versions.

Install

$ npm i chronver-regex

Usage

// 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

API

chronverRegex

Just a regular expression. 😰 You better know what you are doing.

Tests

# 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

License

MIT © netop://ウエハ