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

0.28.0 • Public • Published

@here/harp-fetch

##Overview

This module adds a subset of the fetch API for Node.js. This allows code written for the browser to also execute in Node.js.

The main goal of this module is to provide enough compatibility to allow running unit tests in Node.js. It is not 100% feature and behavior compatible with fetch.

The feature set is that of node-fetch with the addition of a dummy AbortController.

Usage

Import the module for its side-effects:

import "@here/harp-fetch"

This adds fetch to the global Node.js namespace.

Behavior in Browser Context

When this module is used in a browser context, it does nothing and adds no code.

Readme

Keywords

none

Package Sidebar

Install

npm i @here/harp-fetch

Weekly Downloads

311

Version

0.28.0

License

Apache-2.0

Unpacked Size

17.2 kB

Total Files

8

Last publish

Collaborators

  • here-bot
  • here-maps
  • heremaps