@studiocms/cfetch 0.1.0 → 0.1.1
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 +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# `@studiocms/cfetch`
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://npm.im/@studiocms/cfetch)
|
|
6
|
+
[](https://biomejs.dev/)
|
|
7
|
+
[](https://astro.build)
|
|
8
|
+
|
|
3
9
|
This is an [Astro integration](https://docs.astro.build/en/guides/integrations-guide/) that provides a cacheable fetch function for Astro SSR
|
|
4
10
|
|
|
5
11
|
## Usage
|
|
@@ -58,7 +64,7 @@ You can import the cachedFetch function anywhere you would use a normal `fetch`
|
|
|
58
64
|
|
|
59
65
|
```astro
|
|
60
66
|
---
|
|
61
|
-
import { cFetch } from '
|
|
67
|
+
import { cFetch } from 'c:fetch';
|
|
62
68
|
|
|
63
69
|
const response = await cFetch(
|
|
64
70
|
'https://example.com', // string | URL | Request
|
|
@@ -74,7 +80,7 @@ If you are also wanting the other available metadata (such as `lastChecked` valu
|
|
|
74
80
|
|
|
75
81
|
```astro
|
|
76
82
|
---
|
|
77
|
-
import { cFetch } from '
|
|
83
|
+
import { cFetch } from 'c:fetch';
|
|
78
84
|
|
|
79
85
|
const { lastCheck, data: response } = await cFetch(
|
|
80
86
|
'https://example.com', // string | URL | Request
|
package/package.json
CHANGED