Skip to content

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

License

Notifications You must be signed in to change notification settings

fabiospampinato/fetch-shim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published