Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-validator

Package Overview
Dependencies
Maintainers
4
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-validator - npm Package Compare versions

Comparing version 6.12.1 to 6.12.2

6

package.json

@@ -10,3 +10,3 @@ {

],
"version": "6.12.1",
"version": "6.12.2",
"homepage": "https://express-validator.github.io",

@@ -27,3 +27,5 @@ "license": "MIT",

"!**/*.ts",
"**/*.d.ts"
"**/*.d.ts",
"!website/",
"!docs/"
],

@@ -30,0 +32,0 @@ "scripts": {

@@ -6,2 +6,3 @@ import { Sanitizers } from '../chain/sanitizers';

import { Optional } from '../context';
import { ResultWithContext } from '../chain/context-runner-impl';
declare type ValidatorSchemaOptions<K extends keyof Validators<any>> = true | {

@@ -47,4 +48,4 @@ options?: Parameters<Validators<any>[K]> | Parameters<Validators<any>[K]>[0];

export declare function checkSchema(schema: Schema, defaultLocations?: Location[]): ValidationChain[] & {
run: (req: Request) => Promise<unknown[]>;
run: (req: Request) => Promise<ResultWithContext[]>;
};
export {};

@@ -17,2 +17,3 @@ "use strict";

.forEach(method => {
var _a;
if (typeof chain[method] !== 'function') {

@@ -24,3 +25,3 @@ console.warn(`express-validator: a validator/sanitizer with name ${method} does not exist`);

const methodCfg = config[method];
let options = methodCfg === true ? [] : methodCfg.options || [];
let options = methodCfg === true ? [] : (_a = methodCfg.options) !== null && _a !== void 0 ? _a : [];
if (options != null && !Array.isArray(options)) {

@@ -27,0 +28,0 @@ options = [options];

@@ -7,5 +7,3 @@ "use strict";

const utils_1 = require("./utils");
// Assign to a variable so that TS doesn't use its catch all overload, which returns any
const withWithDefaults = { withDefaults };
exports.validationResult = Object.assign(withDefaults(), withWithDefaults);
exports.validationResult = Object.assign(withDefaults(), { withDefaults });
class Result {

@@ -12,0 +10,0 @@ constructor(formatter, errors) {

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