Skip to content

Latest commit

 

History

History

plugin-timeout

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@plantae/plugin-timeout

Timeout plugin for Plantae.

Installation

# npm
npm install @plantae/plugin-timeout

# yarn
yarn add @plantae/plugin-timeout

Usage

import timeoutPlugin from "@plantae/plugin-timeout";

const fetchWithTimeout = createFetch({
  client: fetch,
  plugins: [timeoutPlugin(5000)], // timeout after 5 seconds
});