Socket
Socket
Sign inDemoInstall

@vitrical/utils

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitrical/utils - npm Package Compare versions

Comparing version 1.3.9 to 1.4.0

6

__tests__/validation.test.js

@@ -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(

2

package.json
{
"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

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