<commit_before>// Type definitions for express-validator 2.9.0
// Project: https://github.com/ctavan/express-validator
// Definitions by: <NAME> <https://github.com/axefrog/>, <NAME> <http://dreampulse.de>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

/// <reference path="../express/express.d.ts" />

// Add RequestValidation Interface on to Express's Request Interface.
declare module Express {
	interface Request extends ExpressValidator.RequestValidation {}
}

// External express-validator module.
declare module "express-validator" {
	import express = require('express');

	/**
	 *
	 * @middlewareOptions see: https://github.com/ctavan/express-validator#middleware-options
	 */
	function ExpressValidator(middlewareOptions?:any):express.RequestHandler;

	export = ExpressValidator;
}

// Internal Module.
declare module ExpressValidator {

	export interface ValidationError {
		msg: string;
		param: string;
	}

	interface ValidatorFunction { (item: string, message: string): Validator; }
	interface SanitizerFunction { (item: string): Sanitizer; }
	interface Dictionary<T> { [key: string]: T; }

	export interface RequestValidation {
		assert: ValidatorFunction;
		check: ValidatorFunction;
		checkBody: ValidatorFunction;
		checkFiles: ValidatorFunction;
		checkHeader: ValidatorFunction;
		checkParams: ValidatorFunction;
		checkQuery: ValidatorFunction;
		validate: ValidatorFunction;

		filter: SanitizerFunction;
		sanitize: SanitizerFunction;

		onValidationError(errback: (msg: string) => void): void;
		validationErrors(mapped?: boolean): Dictionary<any> | any[];
	}

	export interface Validator {
		/**
		 * Alias for regex()
		 */
		is(): Validator;
		/**
		 * Alias for notRegex()
		 */
		not(): Validator;
		isEmail(): Validator;
		/**
		 * Accepts http, https, ftp
		 */
		isUrl(): Validator;
		/**
		 * Combines isIPv4 and isIPv6
		 */
		isIP(): Validator;
		isIPv4(): Validator;
		isIPv6(): Validator;
		isAlpha(): Validator;
		isAlphanumeric(): Validator;
		isNumeric(): Validator;
		isHexadecimal(): Validator;
		/**
		 * Accepts valid hexcolors with or without # prefix
		 */
		isHexColor(): Validator;
		/**
		 * isNumeric accepts zero padded numbers, e.g. '001', isInt doesn't
		 */
		isInt(): Validator;
		isLowercase(): Validator;
		isUppercase(): Validator;
		isDecimal(): Validator;
		/**
		 * Alias for isDecimal<commit_msg>Update definition for "express-validator": add "isMACAddress" function.<commit_after>// Type definitions for express-validator 2.9.0
// Project: https://github.com/ctavan/express-validator
// Definitions by: <NAME> <https://github.com/axefrog/>, <NAME> <http://dreampulse.de>
// Definitions: https://github.com/borisyankov/DefinitelyTyped

/// <reference path="../express/express.d.ts" />

// Add RequestValidation Interface on to Express's Request Interface.
declare module Express {
	interface Request extends ExpressValidator.RequestValidation {}
}

// External express-validator module.
declare module "express-validator" {
	import express = require('express');

	/**
	 *
	 * @middlewareOptions see: https://github.com/ctavan/express-validator#middleware-options
	 */
	function ExpressValidator(middlewareOptions?:any):express.RequestHandler;

	export = ExpressValidator;
}

// Internal Module.
declare module ExpressValidator {

	export interface ValidationError {
		msg: string;
		param: string;
	}

	interface ValidatorFunction { (item: string, message: string): Validator; }
	interface SanitizerFunction { (item: string): Sanitizer; }
	interface Dictionary<T> { [key: string]: T; }

	export interface RequestValidation {
		assert: ValidatorFunction;
		check: ValidatorFunction;
		checkBody: ValidatorFunction;
		checkFiles: ValidatorFunction;
		checkHeader: ValidatorFunction;
		checkParams: ValidatorFunction;
		checkQuery: ValidatorFunction;
		validate: ValidatorFunction;

		filter: SanitizerFunction;
		sanitize: SanitizerFunction;

		onValidationError(errback: (msg: string) => void): void;
		validationErrors(mapped?: boolean): Dictionary<any> | any[];
	}

	export interface Validator {
		/**
		 * Alias for regex()
		 */
		is(): Validator;
		/**
		 * Alias for notRegex()
		 */
		not(): Validator;
		isEmail(): Validator;
		/**
		 * Accepts http, https, ftp
		 */
		isUrl(): Validator;

		/**
		 * Combines isIPv4 and isIPv6
		 */
		isIP(): Validator;
		isIPv4(): Validator;
		isIPv6(): Validator;
		isMACAddress(): Validator;
		isAlpha(): Validator;
		isAlphanumeric(): Validator;
		isNumeric(): Validator;
		isHexadecimal(): Validator;
		/**
		 * Accepts valid hexcolors with or without # prefix
		 */
		isHexColor(): Validator;
		/**
		 * isNumeric accepts zero padded numbers, e.g. '001', isInt doesn't
		 */
		isInt(): Validator;
		isLowercase(): Validator;
		isUppercase(): Validator;
		isDecimal(): Validator;
		/**
		 * Alias for isDecimal
{'fraction_non_alphanumeric': 0.1313068651778329, 'fraction_numerical': 0.0041356492969396195, 'mean_word_length': 4.269063180827887, 'pattern_counts': {'":': 1, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7378288', 'n_tokens_mistral': 1602, 'n_tokens_neox': 1448, 'n_words': 363}