https://github.com/belak/native-cross-fetch
https://github.com/belak/native-cross-fetch
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/belak/native-cross-fetch
- Owner: belak
- License: apache-2.0
- Created: 2020-06-16T02:13:26.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T16:43:41.000Z (about 5 years ago)
- Last Synced: 2025-01-17T16:37:08.832Z (6 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# native-cross-fetch
[](https://www.npmjs.com/package/native-cross-fetch)
[](https://github.com/belak/native-cross-fetch)Simple fetch for Node and Browsers. This exports the
[node-fetch](https://github.com/node-fetch/node-fetch) library when used in
NodeJS, and `window.fetch` when used in the browser. Note that if you want to
use this in browsers that don't natively support fetch you will need to use a
polyfill like Github's [whatwg-fetch](https://github.com/github/fetch) or use a
different library like [cross-fetch](https://github.com/lquixada/cross-fetch).This was originally developed for usage in Electron apps where it can be assumed
that a native `fetch` implementation exists.