Developer releases 'canc', a JavaScript library for native promise cancellation
A developer has publicly released 'canc', an open-source JavaScript library designed to bring straightforward promise cancellation to the language. The project began around 2017, originally motivated by compatibility issues between native async functions and Angular's Zone.js reactivity system. After nearly a decade of internal use, bug fixing, and design refinements, the library reached a stable public release. 'canc' uses a generator-based approach, allowing developers to cancel entire promise chains with a simple .cancel() call, without relying on AbortController or manual flag variables. The library also integrates with AbortSignal for broader platform interoperability and is available on GitHub under the cancjs organization.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in