aborter
A minimal reimplementation of AbortController and AbortSignal.
Last updated 4 years ago by fabiospampinato .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install aborter 
SYNC missed versions from official npm registry.

Aborter

A minimal reimplementation of AbortController and AbortSignal.

This library is only 0.5kb minified, but it's not strictly spec-compliant, if you need that go with abort-controller.

Install

npm install --save aborter

Usage

import Aborter from 'aborter';

const aborter = new Aborter ();

console.log ( aborter.signal.aborted ); // => false

aborter.signal.addEventListener ( 'abort', () => {

  console.log ( aborter.signal.aborted ); // => true

});

aborter.abort (); // Aborting, causing event handlers to be triggered and the "aborted" property to be set to "true"

License

MIT © Fabio Spampinato

Current Tags

  • 3.0.0                                ...           latest (2 years ago)

4 Versions

  • 3.0.0                                ...           2 years ago
  • 2.0.0                                ...           3 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 4
Dependencies (0)
None
Dev Dependencies (7)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |