regex-short
v2.1.2
Published
Short constants for common regular expressions
Downloads
25
Maintainers
Readme
regex-short
Short constants for common regular expressions tests
Installation
yarn add regex-short
or
npm install regex-short --save
Basic usage
import {testEmail, testUUIDHash} from 'regex-short'
testEmail('[email protected]') // true
testEmail('[email protected]') // false
testUUIDHash('d7fddffb-44e6-4c90-b56e-0b1a45896739') // true
Props
//Common
testEmail,
testDomain,
testURL,
testPhone,
testHashTag,
testBCryptHash,
testSHA224,
testSHA256,
testSHA384,
testSHA512,
testJWTToken256,
testJWTToken384,
testJWTToken512,
testUUIDHash,
testIPAddress,
testMD5Hash,
// Digits
testDigits,
testNonDigits,
testStartWithDigit,
testStartWithDigits,
testEndWithDigit,
// Letters
testAlphanumeric,
testNonAlphanumeric,
testOnlyLetters,
testNonLetters,
testStartLetter,
testStartLetters,
testEndLetter,
testOnlyLowerCase,
testOnlyUpperCase,