navio / fetch-with-abort

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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();

About

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

License:MIT License


Languages

Language:JavaScript 100.0%