0.7.0 • Published 3 months ago

no-regex-utils v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

NO Regex Utils

Some regex functions so you don't have to worry about it

Install

npm install no-regex-utils

How to use

import NoRegex from "no-regex-utils";

Methods

Validations

isEmail

NoRegex.isEmail("fernando@email.com"); // true

isIPv4

NoRegex.isIPv4("192.168.0.1"); // true

isIPv6

NoRegex.isIPv6("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); // true

isUsername

NoRegex.isUsername(
  "user_test"
  {
  minLength: int,       // optional, default: 3
  maxLength: int,       // optional, default: 16
  underline: boolean,   // optional, default: true
  dash: boolean,        // optional, default: true
}) // true;

isUrl

NoRegex.isUrl("https://google.com"); // true

Manipulations

onlyNumbers

NoRegex.onlyNumbers("test123test"); // 123

onlyLetters

NoRegex.onlyLetters(
  "lE123tterS123"
  {
  lowercase: boolean, // optional, default: true
  uppercase: boolean, // optional, default: true
}) // 'lEtterS';

Author

Fernando Vargas Filho

License

This project is licensed under MIT License

0.7.0

3 months ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago