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.1 to 2.1.2

29

index.js

@@ -0,1 +1,3 @@

const CodeError = require('@darkwolf/code-error')
class Validator {

@@ -106,2 +108,14 @@ constructor(value) {

_isError(value) {
return this._isInstance(value, Error)
}
_isTypeError(value) {
return this._isInstance(value, TypeError)
}
_isCodeError(value) {
return this._isInstance(value, CodeError)
}
_isObjectExact(value) {

@@ -363,2 +377,17 @@ return Object.prototype.toString.call(value) === '[object Object]'

isError(...args) {
if (args.length) return this._isError(...args)
return this._valid(() => this._isError(this.value))
}
isTypeError(...args) {
if (args.length) return this._isTypeError(...args)
return this._valid(() => this._isTypeError(this.value))
}
isCodeError(...args) {
if (args.length) return this._isCodeError(...args)
return this._valid(() => this._isCodeError(this.value))
}
isObjectExact(...args) {

@@ -365,0 +394,0 @@ if (args.length) return this._isObjectExact(...args)

7

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

@@ -23,3 +23,6 @@ "main": "index.js",

},
"homepage": "https://github.com/darkwolf/validator#readme"
"homepage": "https://github.com/darkwolf/validator#readme",
"dependencies": {
"@darkwolf/code-error": "^2.0.9"
}
}

@@ -49,2 +49,5 @@ # Validator Utility

### isUnixTimestamp(value?)
### isError(value?)
### isTypeError(value?)
### isCodeError(value?)
### isObjectExact(value?)

@@ -51,0 +54,0 @@ ### isTrue(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