npm.io
0.1.3 • Published 4 years ago

fesch

Licence
MIT
Version
0.1.3
Deps
1
Size
27 kB
Vulns
0
Weekly
0

fesch

npm npm CI Snyk

Local browser cache for the Fetch API

Installation

npm install fesch -S

Usage

Import
import { Fesch } from 'fesch';

const { fetch } = Fesch({
    expiry: 3_600_000, // 1 hour
});

// Uses the standard Fetch API
await fetch('https://jsonplaceholder.typicode.com/todos/1' {
    headers: {
        accept: 'application/json',
    }
});

License

This work is licensed under The MIT License

Keywords