Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

no-regex-utils

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-regex-utils

No Regex Utils - Common regex functions

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 11 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc