@fatcherjs/middleware-json 1.0.0 → 1.2.0
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.
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fatcherjs/middleware-json",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"main": "dist/
|
|
5
|
-
"module": "dist/
|
|
6
|
-
"browser": "dist/
|
|
7
|
-
"typings": "dist/
|
|
8
|
-
"
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"main": "dist/json.js",
|
|
5
|
+
"module": "dist/json.esm.js",
|
|
6
|
+
"browser": "dist/json.min.js",
|
|
7
|
+
"typings": "dist/json.d.ts",
|
|
8
|
+
"license": "MIT",
|
|
9
9
|
"description": "A fatcher middleware for transforming stream into json",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"fatcher",
|
|
@@ -15,12 +15,17 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
+
"homepage": "https://github.com/fatcherjs/fatcher/tree/master/packages/json",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/fatcherjs/fatcher.git"
|
|
22
|
+
},
|
|
18
23
|
"peerDependencies": {
|
|
19
24
|
"fatcher": "^1.0.0"
|
|
20
25
|
},
|
|
21
26
|
"scripts": {
|
|
22
27
|
"dev": "rimraf dist && rollup -c rollup.config.ts -w",
|
|
23
|
-
"build": "rimraf dist && rollup -c rollup.config.ts"
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
"build": "rimraf dist && rollup -c rollup.config.ts",
|
|
29
|
+
"deploy": "pnpm run build && pnpm publish --no-git-check"
|
|
30
|
+
}
|
|
26
31
|
}
|
package/README.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# @fatcherjs/middleware-json
|
|
2
|
-
|
|
3
|
-
A fatcher middleware for transforming stream into json.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
>$ npm install @fatcherjs/middleware-json
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import { fatcher } from 'fatcher';
|
|
15
|
-
import { json } from '@fatcherjs/middleware-json';
|
|
16
|
-
|
|
17
|
-
fatcher({
|
|
18
|
-
url: '/bar/foo',
|
|
19
|
-
middlewares: [json()],
|
|
20
|
-
})
|
|
21
|
-
.then(res => {
|
|
22
|
-
console.log(res.data); // json data.
|
|
23
|
-
})
|
|
24
|
-
.catch(err => {
|
|
25
|
-
console.error(err);
|
|
26
|
-
});
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
[MIT](../../LICENSE)
|