@jswork/fetch
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

fetch

Get standard fetch from any environment.

version license size download

installation

# browser + bun
yarn add @jswork/fetch

# nodejs
yarn add @jswork/fetch node-fetch@2.6.7

usage

Usage1: import package.

import fetch from '@jswork/fetch';

// as usually
const res = await fetch('https://api.github.com/users/afeiship');
console.log(res);

Usage2: Or import to global(recommend)

import '@jswork/fetch';

const res = await fetch('https://httpbin.org/get').then(r=>r.json())
console.log(res);

license

Code released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @jswork/fetch

Homepage

js.work

Weekly Downloads

126

Version

1.0.13

License

MIT

Unpacked Size

653 kB

Total Files

7

Last publish

Collaborators

  • afeiship