Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@esri/arcgis-rest-fetch

Package Overview
Dependencies
Maintainers
45
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esri/arcgis-rest-fetch

This package exists to expose the `node-fetch` package in a consistent way for both Node JS 12.16+ and various bundlers with consistent TypeScript types based on the browser types.

  • 4.0.0-beta.1
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-6.3%
Maintainers
45
Weekly downloads
 
Created
Source

@esri/arcgis-rest-request

This package exists to expose the node-fetch package in a consistent way for both Node JS 12.16+ and various bundlers with consistent TypeScript types based on the browser types.

This exposes a getFetch() method that returns a Promise that resolves with fetch, Headers, Request and Response. This is async because it uses import("node-fetch") under to hood to load node-fetch@3.0.0 which is ESM only. The only way to load an ESM module in CommonJS in Node is to use the async import().

The package.json contains fields for the following:

  • main - undefined, Node JS should use the exports field and conditional exports.
  • module - Exposes a ESM module. Used by Rollup and Parcel v2.
  • browser - Exposes a CJS module. Used by Parcel v1 and Browserify.
  • exports - exposes conditional exports config with the following conditions. Used by Webpack and soon to be others:
    • module - ESM module exposing browser globals.
    • browser - CJS module exposing browser globals.
    • import - ESM module exposing node-fetch.
    • require - CJS module exposing node-fetch.
    • default - ESM module exposing browser globals.

FAQs

Package last updated on 02 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc