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.0.4 to 2.0.5

27

index.js

@@ -101,2 +101,14 @@ class Validator {

_isInteger(value) {
return Number.isInteger(value)
}
_isSafeInteger(value) {
return Number.isSafeInteger(value)
}
_isFloat(value) {
return this._isNumber(value) && this._isFinite(value) && value % 1
}
_isInfinity(value) {

@@ -236,2 +248,17 @@ return Math.abs(value) === Infinity

isInteger(...args) {
if (args.length) return this._isInteger(...args)
return this._valid(() => this._isInteger(this.value))
}
isSafeInteger(...args) {
if (args.length) return this._isSafeInteger(...args)
return this._valid(() => this._isSafeInteger(this.value))
}
isFloat(...args) {
if (args.length) return this._isFloat(...args)
return this._valid(() => this._isFloat(this.value))
}
isInfinity(...args) {

@@ -238,0 +265,0 @@ if (args.length) return this._isInfinity(...args)

2

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

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

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

### isFinite(value?)
### isInteger(value?)
### isSafeInteger(value?)
### isFloat(value?)
### isInfinity(value?)

@@ -50,0 +53,0 @@ ### isMore(value?, number)

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