fetch-shim
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Fetch Shim

An isomoprhic Fetch function, it just gives you the native one if available, or the one from undici.

Install

npm install --save fetch-shim

Usage

import fetch from 'fetch-shim';

const response = await fetch ( 'https://jsonplaceholder.typicode.com/todos/1' );
const json = await response.json ();

console.log ( json ); // => { userId: 1, id: 1, title: 'delectus aut autem', completed: false }

License

MIT © Fabio Spampinato

Package Sidebar

Install

npm i fetch-shim

Weekly Downloads

33

Version

1.1.1

License

none

Unpacked Size

3.83 kB

Total Files

18

Last publish

Collaborators

  • fabiospampinato