# f-etag

> a thin wrapper around fetch api to provide a basic level in memory cache for etags

Latest version **2.1.0** (published 2018-01-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install f-etag
pnpm add f-etag
yarn add f-etag
bun add f-etag
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2018-01-07 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | export-mike |
| Maintainers | mikeljames |
| Keywords | etags, fetch, http, 302, statuscode |

## Links

- npm: https://www.npmjs.com/package/f-etag
- Repository: https://github.com/export-mike/export-mike-efetch
- Homepage: https://github.com/export-mike/export-mike-efetch#readme
- Issues: https://github.com/export-mike/export-mike-efetch/issues
- npm.io page: https://npm.io/package/f-etag

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2018-01-07
- 2.0.0 — 2016-10-10
- 1.0.0-rc2 — 2016-04-07

## README

# f-etag

A thin wrapper around the `fetch` API. For a given 200 response with an ETag header we resolve the promise for the current request and clone the response and store it in an in-memory cache. For a 304 response with a matching ETag header we resolve the same response object from the previous 200 response.

## Why ETag caching?

They’re a pain to deal with having to check for 304 and deal with the caching strategy yourself, this is not designed to work between refreshes in the browser. This library is aimed towards browser usage. But it’s not setup between browser refreshes? Yes this is a requirement of an existing project but by all means plugin a caching strategy somehow in a PR.

## Install

```shell
npm install f-etag isomorphic-unfetch
```

## Usage

```js
import 'isomorphic-unfetch'
import eFetch from 'f-etag';

// Use eFetch like the normal fetch API.
```

---
_Source: https://npm.io/package/f-etag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
