
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@types/express-mung
Advanced tools
TypeScript definitions for express-mung
npm install --save @types/express-mung
This package contains type definitions for express-mung (https://github.com/richardschneider/express-mung).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-mung.
/// <reference types="node"/>
import { ErrorRequestHandler, Request, RequestHandler, Response } from "express";
export type Transform = (body: {}, request: Request, response: Response) => any;
export type TransformAsync = (body: {}, request: Request, response: Response) => PromiseLike<any>;
export type TransformHeader = (request: Request, response: Response) => any;
export type TransformHeaderAsync = (request: Request, response: Response) => PromiseLike<any>;
export type TransformChunk = (
chunk: string | Buffer,
encoding: string | null,
request: Request,
response: Response,
) => string | Buffer;
export interface Options {
mungError: boolean;
}
/**
* Transform the JSON body of the response.
* @param fn A transformation function.
* @param options json options.
* @return Middleware to transform the body
*/
export function json(fn: Transform, options?: Options): RequestHandler;
/**
* Asynchronously transform the JSON body of the response.
* @param fn A transformation function.
* @param options jsonAsync options.
* @return Middleware to transform the body
*/
export function jsonAsync(fn: TransformAsync, options?: Options): RequestHandler;
/**
* Transform the HTTP headers of the response.
* @param fn A transformation function.
* @return Middleware to transform the headers
*/
export function headers(fn: TransformHeader): RequestHandler;
/**
* Asynchronously transform the HTTP headers of the response.
* @param fn A transformation function.
* @return Middleware to transform the headers
*/
export function headersAsync(fn: TransformHeaderAsync): RequestHandler;
/**
* Transform chunks as they are written to the response
* @param fn A transformation function.
* @param options Write options.
* @return Middleware to transform chunks.
*/
export function write(fn: TransformChunk, options?: Options): RequestHandler;
/**
* Override the default onError handler.
* @see {ErrorRequestHandler}
*/
export let onError: ErrorRequestHandler;
These definitions were written by Cyril Schumacher, and Levi Bostian.
FAQs
TypeScript definitions for express-mung
The npm package @types/express-mung receives a total of 0 weekly downloads. As such, @types/express-mung popularity was classified as not popular.
We found that @types/express-mung demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.