http-parser-js
Advanced tools
Comparing version 0.5.5 to 0.5.6
@@ -66,3 +66,3 @@ type ParserType = | ||
export type OnHeadersCompleteParser<HEADER = HeaderObject, Mode_0_12 extends boolean = true> = Mode_0_12 extends true | ||
? (info: HeaderInfo<HEADER>)=> number | ||
? (info: HeaderInfo<HEADER>)=> number | void | ||
: ( | ||
@@ -78,3 +78,3 @@ versionMajor: number, | ||
shouldKeepAlive: boolean, | ||
)=> number | ||
)=> number | void | ||
export type OnBodyParser = (chunk: Buffer, offset: number, length: number)=> void | ||
@@ -81,0 +81,0 @@ // Only called in the slow case where slow means |
{ | ||
"name": "http-parser-js", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"description": "A pure JS HTTP parser for node.", | ||
@@ -5,0 +5,0 @@ "main": "http-parser.js", |
@@ -36,2 +36,6 @@ ![Node](https://github.com/creationix/http-parser-js/workflows/Node/badge.svg) | ||
## Standalone usage | ||
While this module is intended to be used as a replacement for the internal Node.js parser, it can be used as a standalone parser. The [`standalone-example.js`](standalone-example.js) demonstrates how to use the somewhat awkward API (coming from compatibility with the Node.js internals) to parse HTTP from raw Buffers. | ||
## License | ||
@@ -38,0 +42,0 @@ |
25723
44