Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/koa-bodyparser

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/koa-bodyparser - npm Package Compare versions

Comparing version 4.3.3 to 4.3.4

6

koa-bodyparser/index.d.ts

@@ -7,2 +7,3 @@ // Type definitions for koa-bodyparser 4.3

// Alexi Maschas <https://github.com/amaschas>
// Pirasis Leelatanon <https://github.com/1pete>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -61,2 +62,7 @@ // TypeScript Version: 2.3

/**
* limit of the xml body. Default is 1mb.
*/
xmlLimit?: string | undefined;
/**
* when set to true, JSON parser will only accept arrays and objects. Default is true

@@ -63,0 +69,0 @@ */

11

koa-bodyparser/package.json
{
"name": "@types/koa-bodyparser",
"version": "4.3.3",
"version": "4.3.4",
"description": "TypeScript definitions for koa-bodyparser",

@@ -27,2 +27,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-bodyparser",

"githubUsername": "amaschas"
},
{
"name": "Pirasis Leelatanon",
"url": "https://github.com/1pete",
"githubUsername": "1pete"
}

@@ -41,4 +46,4 @@ ],

},
"typesPublisherContentHash": "268bd49130704759d973d97f0d6b2f8ad7dd238e24a1788499f5d41bf32cf433",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "dcb7f3e7a37ba969fb26a0da61768cc02f2f4f83af5703f9c7053c3b41868186",
"typeScriptVersion": "3.7"
}

@@ -9,94 +9,5 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-bodyparser.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-bodyparser/index.d.ts)
````ts
// Type definitions for koa-bodyparser 4.3
// Project: https://github.com/koajs/body-parser
// Definitions by: Jerry Chin <https://github.com/hellopao>
// Anup Kishore <https://github.com/anup-2s>
// Hiroshi Ioka <https://github.com/hirochachacha>
// Alexi Maschas <https://github.com/amaschas>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/* =================== USAGE ===================
import bodyParser = require("koa-bodyparser");
var Koa = require('koa');
var app = new Koa();
app.use(bodyParser());
=============================================== */
import * as Koa from "koa";
declare module "koa" {
interface Request {
body?: any;
rawBody: string;
}
}
declare function bodyParser(opts?: bodyParser.Options): Koa.Middleware;
declare namespace bodyParser {
interface Options {
/**
* parser will only parse when request type hits enableTypes, default is ['json', 'form'].
*/
enableTypes?: string[] | undefined;
/**
* requested encoding. Default is utf-8 by co-body
*/
encode?: string | undefined;
/**
* limit of the urlencoded body. If the body ends up being larger than this limit
* a 413 error code is returned. Default is 56kb
*/
formLimit?: string | undefined;
/**
* limit of the json body. Default is 1mb
*/
jsonLimit?: string | undefined;
/**
* limit of the text body. Default is 1mb.
*/
textLimit?: string | undefined;
/**
* when set to true, JSON parser will only accept arrays and objects. Default is true
*/
strict?: boolean | undefined;
/**
* custom json request detect function. Default is null
*/
detectJSON?: ((ctx: Koa.Context) => boolean) | undefined;
/**
* support extend types
*/
extendTypes?: {
json?: string[] | undefined;
form?: string[] | undefined;
text?: string[] | undefined;
} | undefined;
/**
* support custom error handle
*/
onerror?: ((err: Error, ctx: Koa.Context) => void) | undefined;
}
}
export = bodyParser;
````
### Additional Details
* Last updated: Thu, 05 Aug 2021 20:31:25 GMT
* Last updated: Sun, 31 Oct 2021 07:31:20 GMT
* Dependencies: [@types/koa](https://npmjs.com/package/@types/koa)

@@ -106,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by [Jerry Chin](https://github.com/hellopao), [Anup Kishore](https://github.com/anup-2s), [Hiroshi Ioka](https://github.com/hirochachacha), and [Alexi Maschas](https://github.com/amaschas).
These definitions were written by [Jerry Chin](https://github.com/hellopao), [Anup Kishore](https://github.com/anup-2s), [Hiroshi Ioka](https://github.com/hirochachacha), [Alexi Maschas](https://github.com/amaschas), and [Pirasis Leelatanon](https://github.com/1pete).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc