Comparing version 2.0.2 to 2.0.3
@@ -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}`, () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49444