rescript-abort-controller

0.1.0 • Public • Published

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)

Package Sidebar

Install

npm i rescript-abort-controller

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

33 kB

Total Files

38

Last publish

Collaborators

  • ri7nz