@chronver/regex
TypeScript icon, indicating that this package has built-in type declarations

2020.6.18 • Public • Published

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

Package Sidebar

Install

npm i @chronver/regex

Weekly Downloads

1

Version

2020.6.18

License

MIT

Unpacked Size

5.58 kB

Total Files

6

Last publish

Collaborators

  • netoperatorwibby