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

@darkwolf/validator

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darkwolf/validator - npm Package Compare versions

Comparing version 13.22.0 to 13.22.1

2

constants.js

@@ -12,2 +12,3 @@ const BASE58_ALPHABET = 'AveDarkwo1f23456789BCEFGHJKLMNPQRSTUVWXYZbcdghijmnpqstuxyz'

const URL_PATTERN = '^https?://(((\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])|(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,})(:([1-9]\\d{0,3}|[1-5]\\d{4}|6[0-4]\\d{3}|65[0-4]\\d{2}|655[0-2]\\d{1}|6553[0-5]))?(/[\\w-.%+@&:~]*)*(\\?[\\w-.%+@&=:;,~]*)?(#[\\w-]*)?$'
const DOMAIN_URL_PATTERN = '^https?://(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}(/[\\w-.%+@&:~]*)*(\\?[\\w-.%+@&=:;,~]*)?(#[\\w-]*)?$'
const EMAIL_PATTERN = '^[\\w-.]+@(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}$'

@@ -37,2 +38,3 @@ const PHONE_NUMBER_PATTERN = '^\\+[1-9]\\d{6,14}$'

URL_PATTERN,
DOMAIN_URL_PATTERN,
EMAIL_PATTERN,

@@ -39,0 +41,0 @@ PHONE_NUMBER_PATTERN,

@@ -430,2 +430,10 @@ const CodeError = require('@darkwolf/code-error')

isDomainURL(value) {
return this.isString(value) && this.isRegex(value, constants.DOMAIN_URL_PATTERN)
}
isDomainUrl(...args) {
return this.isDomainURL(...args)
}
isEmail(value) {

@@ -432,0 +440,0 @@ return this.isString(value) && this.isRegex(value, constants.EMAIL_PATTERN)

2

package.json
{
"name": "@darkwolf/validator",
"version": "13.22.0",
"version": "13.22.1",
"description": "Validator",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -115,2 +115,4 @@ # Validator

### isUrl(value)
### isDomainURL(value)
### isDomainUrl(value)
### isEmail(value)

@@ -117,0 +119,0 @@ ### isPhoneNumber(value)

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