update readme

This commit is contained in:
Randall Schmidt 2021-06-10 12:52:24 -04:00
parent 817119c09e
commit 08d209349c

@ -24,6 +24,15 @@ This module aims to expose the same API as `node-fetch` does for the most common
Load the module and specify the directory to cache respones in. Load the module and specify the directory to cache respones in.
If this syntax looks at all foreign to you, you can do this:
```js
const createNodeFetchCache = require('node-fetch-cache');
const fetch = createNodeFetchCache('./path/to/cache/dir');
```
Same thing.
### async fetch(resource [, init]) ### async fetch(resource [, init])
Same arguments as [node-fetch](https://www.npmjs.com/package/node-fetch). Same arguments as [node-fetch](https://www.npmjs.com/package/node-fetch).