New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 5.0.0 to 5.0.1

83

koa-bodyparser/index.d.ts

@@ -26,49 +26,52 @@ // Type definitions for koa-bodyparser 5.0

declare function bodyParser(opts?: {
/**
* parser will only parse when request type hits enableTypes, default is ['json', 'form'].
*/
enableTypes?: string[];
/**
* requested encoding. Default is utf-8 by co-body
*/
encode?: string;
declare function bodyParser(opts?: bodyParser.Options): Koa.Middleware;
/**
* 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;
declare namespace bodyParser {
interface Options {
/**
* parser will only parse when request type hits enableTypes, default is ['json', 'form'].
*/
enableTypes?: string[];
/**
* requested encoding. Default is utf-8 by co-body
*/
encode?: string;
/**
* limit of the json body. Default is 1mb
*/
jsonLimit?: string;
/**
* 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;
/**
* when set to true, JSON parser will only accept arrays and objects. Default is true
*/
strict?: boolean;
/**
* limit of the json body. Default is 1mb
*/
jsonLimit?: string;
/**
* custom json request detect function. Default is null
*/
detectJSON?: (ctx: Koa.Context) => boolean;
/**
* when set to true, JSON parser will only accept arrays and objects. Default is true
*/
strict?: boolean;
/**
* support extend types
*/
extendTypes?: {
json?: string[];
form?: string[];
text?: string[];
/**
* custom json request detect function. Default is null
*/
detectJSON?: (ctx: Koa.Context) => boolean;
/**
* support extend types
*/
extendTypes?: {
json?: string[];
form?: string[];
text?: string[];
};
/**
* support custom error handle
*/
onerror?: (err: Error, ctx: Koa.Context) => void;
}
}
/**
* support custom error handle
*/
onerror?: (err: Error, ctx: Koa.Context) => void;
}): Koa.Middleware;
declare namespace bodyParser { }
export = bodyParser;
{
"name": "@types/koa-bodyparser",
"version": "5.0.0",
"version": "5.0.1",
"description": "TypeScript definitions for koa-bodyparser",

@@ -27,4 +27,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "304dc402cc4bea7c0cbb60ea6a693716f758b3469a50aef6f83abe4536ca70b5",
"typesPublisherContentHash": "1b397339b102af540e1dbf74f3ac5c777f4d36a6b0b49538843315e0efe2d71c",
"typeScriptVersion": "2.3"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Thu, 21 Jun 2018 00:15:27 GMT
* Last updated: Tue, 10 Jul 2018 01:28:58 GMT
* Dependencies: koa

@@ -14,0 +14,0 @@ * Global values: none

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