Gathering detailed insights and metrics for @types/koa-xml-body
Gathering detailed insights and metrics for @types/koa-xml-body
Gathering detailed insights and metrics for @types/koa-xml-body
Gathering detailed insights and metrics for @types/koa-xml-body
The repository for high quality TypeScript type definitions.
npm install @types/koa-xml-body
Typescript
Module System
66.2
Supply Chain
78.6
Quality
75.5
Maintenance
100
Vulnerability
100
License
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
118,952
Last Day
6
Last Week
557
Last Month
2,330
Last Year
25,507
NOASSERTION License
49,997 Stars
89,698 Commits
30,433 Forks
641 Watchers
6 Branches
9,957 Contributors
Updated on Jul 05, 2025
Latest Version
2.2.3
Package Id
@types/koa-xml-body@2.2.3
Unpacked Size
5.49 kB
Size
2.16 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
50%
6
Compared to previous day
Last Week
24.1%
557
Compared to previous week
Last Month
-13.8%
2,330
Compared to previous month
Last Year
-24.8%
25,507
Compared to previous year
2
npm install --save @types/koa-xml-body
This package contains type definitions for koa-xml-body (https://github.com/creeperyang/koa-xml-body).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-xml-body.
1/* =================== USAGE ===================
2
3 import Koa = require('koa');
4 import KoaXmlBody = require('koa-xml-body');
5
6 const app = new Koa();
7 app.use(KoaXmlBody({
8 onerror: (err, ctx) => {
9 ctx.throw(err.message);
10 }
11 }));
12
13 =============================================== */
14
15import * as Koa from "koa";
16
17import { ParserOptions as Xml2jsOptions } from "xml2js";
18
19declare module "koa" {
20 interface Request {
21 body: any;
22 }
23}
24
25declare function bodyParser(opts?: {
26 // Key used for decoding when to parse ctx.request; default is 'body'
27 key?: string;
28 // requested encoding. Default is utf8. If not set, the lib will retrive it from content-type(such as content-type:application/xml;charset=gb2312).
29 encoding?: string;
30 // limit of the body. If the body ends up being larger than this limit, a 413 error code is returned. Default is 1mb.
31 limit?: number;
32 // length of the body. When content-length is found, it will be overwritten automatically.
33 length?: number;
34 // error handler. Default is a noop function. It means it will eat the error silently. You can config it to customize the response.
35 onerror?: (err: Error, ctx: Koa.Context) => void;
36 // options which will be used to parse xml. Default is {}. See xml2js Options for details.
37 xmlOptions?: Xml2jsOptions;
38}): Koa.Middleware;
39
40declare namespace bodyParser {}
41export = bodyParser;
42
These definitions were written by Ulf Winkelvos.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 25/29 approved changesets -- score normalized to 8
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More