GitShow/sindresorhus/p-cancelable
sindresorhus

p-cancelable

Create a promise that can be canceled

by sindresorhus
Star on GitHubForknpm

JavaScript

449 stars24 forks12 contributorsQuiet · 9mo agoSince 2016v4.0.1MIT

Meet the team

See all 12 on GitHub →
sindresorhus
sindresorhus38 contributions
szmarczak
szmarczak3 contributions
BendingBender
BendingBender2 contributions
fregante
fregante2 contributions
jopemachine
jopemachine2 contributions
alextes
alextes1 contribution
astoilkov
astoilkov1 contribution
theqabalist
theqabalist1 contribution

Languages

View on GitHub →
JavaScript82.3%
TypeScript17.7%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
AndyOGo
Thenable isn't cancelable anymoreClosedIssue

Calling on a returns a , which can't be canceled anymore. Problem is here: https://github.com/sindresorhus/p-cancelable/blob/cdec148b9c5995e8f4dae05efb2cd56636d7a728/index.js#L73-L75

AndyOGo · 9mo ago
fluggo
Not compatible with global Bluebird promisesClosedIssue

This library, and therefore got, can't be used in a program that uses Bluebird promises globally. This is because PCancelable amends its prototype tree to make it a subclass of Promise but never calls the base Promise constructor, making it a false subclass. The following code demonstrates this: The code produces no output. It should print .

fluggo · 9mo ago
sindresorhus
DecoratorClosedIssue

Would be useful to expose a decorator when the Decorator proposal is more stable. I'm thinking something like: Just opening this issue so I won't forget. Not something worth doing yet.

sindresorhus · 9mo ago
Structured data for AI agents

Repository: sindresorhus/p-cancelable. Description: Create a promise that can be canceled Stars: 449, Forks: 24. Primary language: JavaScript. Languages: JavaScript (82.3%), TypeScript (17.7%). License: MIT. Latest release: v4.0.1 (3y ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Community health: 85%. Top contributors: sindresorhus, szmarczak, BendingBender, fregante, jopemachine, alextes, astoilkov, theqabalist, amannn, jonschlinkert and others.

·@ofershap

Replace github.com with gitshow.dev