0.1.0 • Published 3 years ago

rescript-abort-controller v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

rescript-abort-controller

Zero-cost bindings for Web API AbortController

Installation

Run the following in your favorit console:

> yarn add rescript-abort-controller

OR

> npm install --save rescript-abort-controller

Then, add rescript-abort-controller in your bsconfig.json:

-- "bs-dependencies": [],
++ "bs-dependencies": ["rescript-abort-controller"],

Usage

// construct
let abortController = AbortController.new()

// access property `signal`
abortController->AbortController.signal

// access method `abort`
abortController->AbortController.abort

Or you can check this examples.

API

(WIP)