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 6.6.9 to 6.7.0

2

package.json
{
"name": "@darkwolf/validator",
"version": "6.6.9",
"version": "6.7.0",
"description": "Validator",

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

@@ -100,1 +100,10 @@ # Validator

### isJWT(value?)
## Error Codes
#### invalid-options
#### invalid-name
#### invalid-complete
#### invalid-generate-messages
#### invalid-throw-errors
#### invalid-custom-error
#### invalid-callback
#### invalid-error-message

@@ -9,3 +9,3 @@ const TIMESTAMP_REGEX = /^[1-9]\d{11,12}$/

const ASCII_REGEX = /^[ -~]+$/
const BASE64_REGEX = /^(([a-z\d+/]{4})*([a-z\d+/]{3}=|[a-z\d+/]{2}==)?){4,}$/i
const BASE64_REGEX = /^([a-z\d+/]{4}|([a-z\d+/]{3}=|[a-z\d+/]{2}==)|([a-z\d+/]{4})+([a-z\d+/]{3}=|[a-z\d+/]{2}==)?)$/i
const BASE64URL_REGEX = /^[\w-]+$/

@@ -12,0 +12,0 @@ const BASE58_REGEX = /^[AveDarkwo1f23456789BCEFGHJKLMNPQRSTUVWXYZbcdghijmnpqstuxyz]+$/

@@ -400,3 +400,3 @@ const CodeError = require('@darkwolf/code-error')

if (this.hasOwnProperty('value')) {
if (!this.hasOwnProperty('optional') || this.hasOwnProperty('optional') && !this._isUndefined(this.value)) {
if (!this.hasOwnProperty('optional') || this.hasOwnProperty('optional') && this._isUndefined(this.value)) {
if (this._isUndefined(this.isValid) || this.isValid || this.complete) {

@@ -403,0 +403,0 @@ const isValid = !!callback(this.value, ...args)

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