Socket
Socket
Sign inDemoInstall

aborter

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aborter

A minimal reimplementation of AbortController and AbortSignal.


Version published
Weekly downloads
734
decreased by-2.13%
Maintainers
1
Install size
6.35 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 11 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc