readme formatting

This commit is contained in:
mistval 2023-03-13 21:00:02 -04:00
parent 5f48f0fc8a
commit 44786dfb68
3 changed files with 7 additions and 4 deletions

View File

@ -134,7 +134,10 @@ The HTTP standard describes a [Cache-Control request header](https://developer.m
```js
import fetch from 'node-fetch-cache';
const response = await fetch('https://google.com', { headers: { 'Cache-Control': 'only-if-cached' } });
const response = await fetch('https://google.com', {
headers: { 'Cache-Control': 'only-if-cached' }
});
if (response === undefined) {
// No response was found in the cache
}

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "node-fetch-cache",
"version": "3.1.0",
"version": "3.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "node-fetch-cache",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",
"dependencies": {
"cacache": "^15.2.0",

View File

@ -1,6 +1,6 @@
{
"name": "node-fetch-cache",
"version": "3.1.0",
"version": "3.1.1",
"description": "node-fetch with caching.",
"main": "src/index.js",
"type": "module",