# redstone-fetch-undici

> Isomorphic exports of fetch from window and unduci

Latest version **1.0.8** (published 2022-01-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install redstone-fetch-undici
pnpm add redstone-fetch-undici
yarn add redstone-fetch-undici
bun add redstone-fetch-undici
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2022-01-07 |
| First published | 2022-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 (+26 in 1 direct dependencies) |
| Install scripts | no |
| Author | Bret Comnes |
| Maintainers | redstone-finance |

## Links

- npm: https://www.npmjs.com/package/redstone-fetch-undici
- Repository: https://github.com/bcomnes/fetch-undici
- Issues: https://github.com/bcomnes/fetch-undici/issues
- Funding: https://github.com/sponsors/bcomnes
- npm.io page: https://npm.io/package/redstone-fetch-undici

## Dependencies (1)

- [undici](https://npm.io/package/undici.md) ^4.12.1

## Recent versions

- 1.0.8 (latest) — 2022-01-07

## README

# fetch-undici
[![Actions Status](https://github.com/bcomnes/fetch-undici/workflows/tests/badge.svg)](https://github.com/bcomnes/fetch-undici/actions)

Isomorphic exports of `fetch`, providing [`window.fetch`][br] in the browser, and [`undici.fetch`][ud] in node.js.

```
npm install fetch-undici
```

## Usage


``` js
import { fetch } from 'fetch-undici';
```

## Why

If you wan't to write an API client of some kind, that would be useful in the browser or in Node.js, `fetch-undici` provides the best implementation of `fetch` for the environment it's used in.

## How

`fetch-undici` works by utilizing environment specific exports fields so that you can have dependency injection at the built-in node module resolver layer.
It supports the following export fields:

- `main` (cjs node)
- `browser` (cjs browser)
- `exports.node` (cjs node)
- `exports.browser` (esm browser)

## License

MIT

[br]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
[ud]: https://github.com/nodejs/undici

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