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 2.1.9 to 2.2.0

32

index.js

@@ -157,2 +157,6 @@ class Validator {

_isValidator(value) {
return this._isInstance(value, Validator)
}
_isCodeError(value) {

@@ -348,2 +352,14 @@ return this._isInstance(value, this.CodeError)

_isBase64(value) {
return this._isRegex(value, /^(([a-z\d+/]{4})*([a-z\d+/]{3}=|[a-z\d+/]{2}==)?){4,}$/i)
}
_isBase64Url(value) {
return this._isRegex(value, /^[\w-]+$/)
}
_isBase58(value) {
return this._isRegex(value, /^[AveDarkwo1f23456789BCEFGHJKLMNPQRSTUVWXYZbcdghijmnpqstuxyz]+$/)
}
_validate(method, args) {

@@ -475,2 +491,6 @@ if (this._setted) {

isValidator(...args) {
return this._validate('_isValidator', args)
}
isCodeError(...args) {

@@ -619,4 +639,16 @@ return this._validate('_isCodeError', args)

}
isBase64(...args) {
return this._validate('_isBase64', args)
}
isBase64Url(...args) {
return this._validate('_isBase64Url', args)
}
isBase58(...args) {
return this._validate('_isBase58', args)
}
}
module.exports = new Validator()

2

package.json
{
"name": "@darkwolf/validator",
"version": "2.1.9",
"version": "2.2.0",
"description": "Validator Utility",

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

@@ -56,2 +56,3 @@ # Validator Utility

### isTypeError(value?)
### isValidator(value?)
### isCodeError(value?)

@@ -93,1 +94,4 @@ ### isNaN(value?)

### isASCII(value?)
### isBase64(value?)
### isBase64Url(value?)
### isBase58(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