milliparsec 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
<img src="logo.png" width="400px" />
|
|
4
4
|
<br /><br />
|
|
5
5
|
|
|
6
|
-
[![Version][v-badge-url]][npm-url] [![Coverage][cov-img]][cov-url]
|
|
6
|
+
[![Version][v-badge-url]][npm-url] [![Coverage][cov-img]][cov-url]
|
|
7
|
+
[![Github actions][gh-actions-img]][github-actions]
|
|
8
|
+
[![Downloads][dl-badge-url]][npm-url]
|
|
7
9
|
|
|
8
10
|
</div>
|
|
9
11
|
<br />
|
|
@@ -18,7 +20,7 @@ Check out [deno-libs/parsec](https://github.com/deno-libs/parsec) for Deno port.
|
|
|
18
20
|
- 📦 tiny package size (8KB dist size)
|
|
19
21
|
- 🔥 no dependencies
|
|
20
22
|
- ✨ [tinyhttp](https://github.com/tinyhttp/tinyhttp) and Express support
|
|
21
|
-
- ⚡
|
|
23
|
+
- ⚡ 40% faster than body-parser and 20x faster than formidable
|
|
22
24
|
|
|
23
25
|
## Install
|
|
24
26
|
|
|
@@ -51,7 +53,8 @@ const server = createServer(async (req: ReqWithBody, res) => {
|
|
|
51
53
|
|
|
52
54
|
### What is "parsec"?
|
|
53
55
|
|
|
54
|
-
The parsec is a unit of length used to measure large distances to astronomical
|
|
56
|
+
The parsec is a unit of length used to measure large distances to astronomical
|
|
57
|
+
objects outside the Solar System.
|
|
55
58
|
|
|
56
59
|
[v-badge-url]: https://img.shields.io/npm/v/milliparsec.svg?style=for-the-badge&color=25608B&logo=npm&label=
|
|
57
60
|
[npm-url]: https://www.npmjs.com/package/milliparsec
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Buffer } from 'node:buffer';
|
|
1
|
+
import { Buffer, File } from 'node:buffer';
|
|
2
2
|
export const hasBody = (method) => ['POST', 'PUT', 'PATCH', 'DELETE'].includes(method);
|
|
3
3
|
const defaultPayloadLimit = 102400; // 100KB
|
|
4
4
|
const defaultErrorFn = (payloadLimit) => new Error(`Payload too large. Limit: ${payloadLimit} bytes`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "milliparsec",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "tiniest body parser in the universe",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"body-parsing"
|
|
18
18
|
],
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=20"
|
|
20
|
+
"node": ">=18.13 || >=19.20 || >=20"
|
|
21
21
|
},
|
|
22
22
|
"exports": "./dist/index.js",
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@biomejs/biome": "1.9.3",
|
|
25
25
|
"@tinyhttp/app": "^2.4.0",
|
|
26
|
-
"@types/node": "^
|
|
26
|
+
"@types/node": "^18.19.76",
|
|
27
27
|
"c8": "10.1.2",
|
|
28
28
|
"supertest-fetch": "^2.0.0",
|
|
29
29
|
"tsx": "^4.19.1",
|