Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via pnpm

isomorphic-fetch 3.0.0

Isomorphic WHATWG Fetch API, for Node & Browserify
Package summary
Share
0
issues
2
licenses
5
MIT
1
BSD-2-Clause
Package created
7 Nov 2014
Version published
23 Sep 2020
Maintainers
2
Total deps
6
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
5 Packages, Including:
isomorphic-fetch@3.0.0
node-fetch@2.7.0
tr46@0.0.3
whatwg-fetch@3.6.20
whatwg-url@5.0.0

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
webidl-conversions@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of isomorphic-fetch 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
node-fetch2.7.043.6 kBMIT
prod
whatwg-fetch3.6.2013.15 kBMIT
prod

Visualizations

Frequently Asked Questions

What does isomorphic-fetch do?

Isomorphic-Fetch is a library that enables the use of the Fetch API in a node environment and ensures its functionality is consistent between the client and the server. By leveraging GitHub's WHATWG Fetch polyfill, it allows developers to use fetch in their Node.js code in a cross-browser compliant manner, mitigating the inconsistencies found in browser implementations of the Fetch API.

How do you use isomorphic-fetch?

To start using Isomorphic-Fetch in your project, you need to install the package. If you are using npm as your package manager, the installation command is npm install --save isomorphic-fetch. For Bower users, the command is bower install --save isomorphic-fetch.

Once installed, the Fetch API can be invoked in your code by requiring the isomorphic-fetch module at the top of your JavaScript file:

require('isomorphic-fetch');

fetch('http://example.com/some-api-endpoint')
.then(function(response) {
    if (response.status >= 400) {
        throw new Error("Bad response from server");
    }
    return response.json();
})
.then(function(data) {
    console.log(data);
});

In this example, we use the fetch function to make a request to 'http://example.com/some-api-endpoint'. If the response status is 400 or above, it throws an error. Otherwise, it converts the received data to a JSON object and logs it to the console.

Where are the isomorphic-fetch docs?

The documentation for Isomorphic-Fetch can be found on its GitHub repository, at https://github.com/matthew-andrews/isomorphic-fetch. It offers detailed information on installation, usage, licensing and alternatives. The examples of using fetch with different APIs are also provided to guide new users. Be sure to check out the repository's readme file for a quick guide to getting started with isomorphic-fetch.