Socket
Socket
Sign inDemoInstall

valido

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valido - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

dist/validators/existy.js

6

dist/index.js

@@ -11,3 +11,3 @@ 'use strict';

var isUndefined = require('./validators/undefined');
var isNullOrUndefined = require('./validators/nullOrUndefined');
var isExisty = require('./validators/existy');
var isInteger = require('./validators/integer');

@@ -29,3 +29,3 @@ var isFinite = require('./validators/finite');

array: isArray,
nullOrUndefined: isNullOrUndefined,
existy: isExisty,
integer: isInteger,

@@ -85,3 +85,3 @@ finite: isFinite,

function validateOptional(value, validator, options) {
if (isNullOrUndefined(value)) {
if (isExisty(value)) {
return true;

@@ -88,0 +88,0 @@ }

{
"name": "valido",
"version": "2.0.2",
"version": "2.0.3",
"description": "Validation provider",

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

@@ -11,3 +11,3 @@ 'use strict';

const isUndefined = require('./validators/undefined');
const isNullOrUndefined = require('./validators/nullOrUndefined');
const isExisty = require('./validators/existy');
const isInteger = require('./validators/integer');

@@ -29,3 +29,3 @@ const isFinite = require('./validators/finite');

array: isArray,
nullOrUndefined: isNullOrUndefined,
existy: isExisty,
integer: isInteger,

@@ -79,3 +79,3 @@ finite: isFinite,

function validateOptional(value, validator, options) {
if (isNullOrUndefined(value)) {
if (isExisty(value)) {
return true;

@@ -82,0 +82,0 @@ }

@@ -24,4 +24,4 @@ 'use strict';

const notNullOrUndefinedTestValue = (test) => !valido.nullOrUndefined(test.value);
const optionalValueTests = _.filter(tests, notNullOrUndefinedTestValue);
const hasTestValue = (test) => !valido.existy(test.value);
const optionalValueTests = _.filter(tests, hasTestValue);

@@ -28,0 +28,0 @@ describe(`Validators - ${validatorName}`, () => {

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