New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

regexpool

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexpool

A library of frequently used regex samples

latest
Source
npmnpm
Version
1.4.0
Version published
Weekly downloads
7
75%
Maintainers
1
Weekly downloads
 
Created
Source

regexPool

A library of frequently used regex samples.

Installation

npm i regexpool

Usage

It is implemented from within the regexPool file. For example:

import { forExample } from 'regexpool'

You must send parameters to the function you called last. The value true / false will return you:

const regexPoolVariable = forExample('parameter');

Regex Properties

NameUsed TypeReturn Options
isEmailisEmail('example@domain.com')true, false
onlyLettersonlyLetters('example')true, false
onlyNumbersonlyNumbers('123')true, false
isDateisDate('31/05/2020', 'DD/MM/YYYY'), isDate('2020/6/1', 'YYYY/MM/DD')true, false
isDomainisDomain('www.sample.com', 'wwwPath'), isDomain('sub.sample.com.tr', 'wwwOptionally')true, false

License

MIT

Changelog

v1.0.0

Initial commit and Adding isEmail control

v1.1.0

Adding onlyLetters control

v1.2.0

Adding onlyNumbers control

v1.3.0

Adding isDate control

v1.4.0

Adding isDomain control

Keywords

javascript regex

FAQs

Package last updated on 06 Jun 2020

Related posts