@fetchkit/ffetch 3.4.1 → 3.4.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 +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-

|
|
2
|
+

|
|
3
3
|

|
|
4
4
|
|
|
5
5
|

|
|
6
6
|

|
|
7
7
|
|
|
8
|
-

|
|
9
|
+

|
|
10
|
+

|
|
11
11
|
|
|
12
|
-
# @
|
|
12
|
+
# @fetchkit/ffetch
|
|
13
13
|
|
|
14
14
|
**A production-ready TypeScript-first drop-in replacement for native fetch, or any fetch-compatible implementation.**
|
|
15
15
|
|
|
@@ -31,13 +31,13 @@ ffetch can wrap any fetch-compatible implementation (native fetch, node-fetch, u
|
|
|
31
31
|
### Install
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
npm install @
|
|
34
|
+
npm install @fetchkit/ffetch
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Basic Usage
|
|
38
38
|
|
|
39
39
|
```typescript
|
|
40
|
-
import createClient from '@
|
|
40
|
+
import createClient from '@fetchkit/ffetch'
|
|
41
41
|
|
|
42
42
|
// Create a client with timeout and retries
|
|
43
43
|
const api = createClient({
|
|
@@ -55,7 +55,7 @@ const data = await response.json()
|
|
|
55
55
|
|
|
56
56
|
```typescript
|
|
57
57
|
// Example: SvelteKit, Next.js, Nuxt, or node-fetch
|
|
58
|
-
import createClient from '@
|
|
58
|
+
import createClient from '@fetchkit/ffetch'
|
|
59
59
|
|
|
60
60
|
// Pass your framework's fetch implementation
|
|
61
61
|
const api = createClient({
|
|
@@ -143,7 +143,7 @@ npm install abort-controller-x
|
|
|
143
143
|
|
|
144
144
|
```html
|
|
145
145
|
<script type="module">
|
|
146
|
-
import createClient from 'https://unpkg.com/@
|
|
146
|
+
import createClient from 'https://unpkg.com/@fetchkit/ffetch/dist/index.min.js'
|
|
147
147
|
|
|
148
148
|
const api = createClient({ timeout: 5000 })
|
|
149
149
|
const data = await api('/api/data').then((r) => r.json())
|