@types/host-validation
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

Installation

npm install --save @types/host-validation

Summary

This package contains type definitions for host-validation (https://github.com/brannondorsey/host-validation).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/host-validation.

index.d.ts

import { NextFunction, Request, Response } from "express";

declare namespace hostValidation {
    interface config {
        hosts?: Array<string | RegExp> | undefined;
        referers?: Array<string | RegExp> | undefined;
        mode?: "both" | "either" | undefined;
        fail?(req: Request, res: Response, next: NextFunction): void;
    }
}

declare function hostValidation(opts: hostValidation.config): (req: Request, res: Response, next: NextFunction) => void;

export = hostValidation;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/express

Credits

These definitions were written by Rich Liu.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/host-validation

Weekly Downloads

2,946

Version

2.0.4

License

MIT

Unpacked Size

3.67 kB

Total Files

5

Last publish

Collaborators

  • types