@libsql/isomorphic-fetch
Version:
Isomorphic fetch() in Node, Deno and Cloudflare Workers
14 lines (10 loc) • 393 B
Markdown
This package provides `fetch()` on Node (using `node-fetch`) and in Deno and Cloudflare Workers (using the native `fetch()`). Supports both CommonJS and ES modules.
```javascript
import { fetch } from "@libsql/isomorphic-fetch";
fetch("http://localhost:8080").then((response) => {
response.text().then((text) => {
console.log(text);
});
});
```