Skip to content

ChronVer/regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@chronver/regex

Regular expression for matching chronver versions.

Install

$ npm i @chronver/regex

Requirements

@chronver/regex is an evergreen module. 🌲 This module requires an Active LTS Node version (v12.0.0+).

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://ウエハ