vigor-fetch 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/README.md +4 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -58,9 +58,7 @@ npm install vigor-fetch
58
58
 
59
59
  ```javascript
60
60
 
61
- import Vigor from 'vigor-fetch';
62
-
63
- const vigor = new Vigor();
61
+ import vigor from 'vigor-fetch';
64
62
 
65
63
  const data = await vigor.fetch("https://api.example.com")
66
64
  .path("/v1/users")
@@ -80,9 +78,7 @@ const data = await vigor.fetch("https://api.example.com")
80
78
 
81
79
  ```javascript
82
80
 
83
- import Vigor from 'vigor-fetch';
84
-
85
- const vigor = new Vigor();
81
+ import vigor from 'vigor-fetch';
86
82
 
87
83
  const apiClient = vigor.fetch("https://api.myapp.com")
88
84
  .headers({ "Content-Type": "application/json" })
@@ -98,9 +94,7 @@ const settings = await apiClient.path("/settings").request();
98
94
 
99
95
  ```javascript
100
96
 
101
- import Vigor from 'vigor-fetch';
102
-
103
- const vigor = new Vigor();
97
+ import vigor from 'vigor-fetch';
104
98
 
105
99
  const tasks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(id => () =>
106
100
  vigor.fetch("https://api.com").path(`/data/${id}`).request()
@@ -118,9 +112,7 @@ const results = await vigor.all()
118
112
 
119
113
  ```javascript
120
114
 
121
- import Vigor from 'vigor-fetch';
122
-
123
- const vigor = new Vigor();
115
+ import vigor from 'vigor-fetch';
124
116
 
125
117
  const api = vigor.fetch("https://api.com")
126
118
  .beforeRequest((opt) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigor-fetch",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Smart, zero-dependency HTTP client with self-healing retries for rate-limited servers.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",