🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

simple-validators

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-validators - npm Package Compare versions

Comparing version

to
1.0.5

2

dist/validators.d.ts

@@ -89,3 +89,3 @@ import type { KeyOptions, ValidationOptions } from './types.js';

/**
* Validates value is an object
* Validates value is an object with string keys
*/

@@ -92,0 +92,0 @@ export declare function validateObject(input: any, opts: ValidationOptions): Record<string, any> | undefined;

@@ -209,3 +209,3 @@ import { formatDate } from './utils.js';

/**
* Validates value is an object
* Validates value is an object with string keys
*/

@@ -215,2 +215,4 @@ export function validateObject(input, opts) {

return validationError(`must be object`, opts);
if (Array.isArray(input))
return validationError(`must be object, not array`, opts);
return input;

@@ -217,0 +219,0 @@ }

{
"name": "simple-validators",
"version": "1.0.4",
"version": "1.0.5",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Schema validation functions and error reporting framework",

Sorry, the diff of this file is not supported yet