/fetch-with-abort

A function that returns fetch object that when run will abort previous request. Kind of a denouncer but for fetching data.

Primary LanguageJavaScriptMIT LicenseMIT

fetch-with-abort

A function that returns fetch object that when run will abort previous request. Kind of a debouncer but for fetching data.

Dependencies

There are dependencies. Footprint:

  • 222 B: index.js
  • 71 B: index.mjs
  • 146 B: index.umd.js

Requirements

If the browser doesn't support Abort Controller. You can include in your build/release Abort Controller Polyfill

How

import FetchOneAtTime from 'fetch-with-abort';
let searchInApi = new FetchOneAtTime();