@vitrical/utils
Advanced tools
Comparing version 1.3.9 to 1.4.0
@@ -136,2 +136,8 @@ "use strict"; | ||
}); | ||
it('Optional + array 2', () => { | ||
const result = (0, validation_1.validateObject)({ | ||
str: ['string[]?', 2, 4], | ||
}, {}); | ||
expect(result.length).toEqual(0); | ||
}); | ||
it('object', () => { | ||
@@ -138,0 +144,0 @@ const result = (0, validation_1.validateObject)({ |
@@ -220,2 +220,13 @@ import { validateObject } from '../validation' | ||
it('Optional + array 2', () => { | ||
const result = validateObject( | ||
{ | ||
str: ['string[]?', 2, 4], | ||
}, | ||
{} | ||
) | ||
expect(result.length).toEqual(0) | ||
}) | ||
it('object', () => { | ||
@@ -222,0 +233,0 @@ const result = validateObject( |
{ | ||
"name": "@vitrical/utils", | ||
"version": "1.3.9", | ||
"version": "1.4.0", | ||
"description": "Collection of useful functions and typings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -191,3 +191,16 @@ "use strict"; | ||
} | ||
if (['number?', 'string?', 'array?', 'bigint?', 'boolean?', 'object?'].includes(validationType) && | ||
if ([ | ||
'number?', | ||
'string?', | ||
'array?', | ||
'bigint?', | ||
'boolean?', | ||
'object?', | ||
'number[]?', | ||
'string[]?', | ||
'boolean[]?', | ||
'object[]?', | ||
'bigint[]?', | ||
'undefined[]?', | ||
].includes(validationType) && | ||
value === undefined) { | ||
@@ -194,0 +207,0 @@ return null; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
61769
1092