
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@types/body-parser-xml
Advanced tools
TypeScript definitions for body-parser-xml
npm install --save @types/body-parser-xml
This package contains type definitions for body-parser-xml (https://github.com/fiznool/body-parser-xml).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser-xml.
/// <reference types="node" />
// import bodyParser = require('body-parser');
import { BodyParser } from "body-parser";
import { NextHandleFunction } from "connect";
import { Request, Response } from "express-serve-static-core";
import { ParserOptions } from "xml2js";
/**
* This library adds an xml method to the body-parser object.
*/
declare function bodyParserXml(bodyParser: BodyParser): void;
declare namespace bodyParserXml {
interface Options {
/**
* Specify the default character set for the text content if the charset is not specified in the Content-Type header of the request.
* @default 'utf-8'
*/
defaultCharset?: BufferEncoding | undefined;
/**
* When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected.
* @default true
*/
inflate?: boolean | undefined;
/**
* Controls the maximum request body size. If this is a number, then the value specifies the number of bytes; if it is a string, the value is passed to the bytes library for parsing.
* @default '100kb'
*/
limit?: string | number | undefined;
/**
* The type option is used to determine what media type the middleware will parse.
* @default ['_/xml', '+xml']
*/
type?: string | string[] | ((req: Request) => boolean) | undefined;
/**
* The verify option, if supplied, is called as verify(req, res, buf, encoding),
* where buf is a Buffer of the raw request body and encoding is the encoding of the request.
* The parsing can be aborted by throwing an error.
*/
verify?: ((req: Request, res: Response, buf: Buffer, encoding: BufferEncoding) => void) | undefined;
/**
* This option controls the behaviour of the XML parser
*/
xmlParseOptions?: ParserOptions | undefined;
}
}
export = bodyParserXml;
declare module "body-parser" {
interface BodyParser {
xml(options?: bodyParserXml.Options): NextHandleFunction;
}
}
These definitions were written by tbounsiar, and Piotr Błażejewicz.
FAQs
TypeScript definitions for body-parser-xml
We found that @types/body-parser-xml 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.