Gathering detailed insights and metrics for @permettezmoideconstruire/cancellable-promise
Gathering detailed insights and metrics for @permettezmoideconstruire/cancellable-promise
Gathering detailed insights and metrics for @permettezmoideconstruire/cancellable-promise
Gathering detailed insights and metrics for @permettezmoideconstruire/cancellable-promise
Non intrusive Promise wrapper to make it cancellable
npm install @permettezmoideconstruire/cancellable-promise
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Stars
91 Commits
1 Forks
1 Branches
12 Contributors
Updated on May 21, 2024
Latest Version
0.0.2
Package Id
@permettezmoideconstruire/cancellable-promise@0.0.2
Unpacked Size
23.60 kB
Size
6.70 kB
File Count
6
NPM Version
5.6.0
Node Version
9.5.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Non intrusive Promise wrapper to make it cancellable
npm install @permettezmoideconstruire/cancellable-promise
or include
<script src="https://unpkg.com/@permettezmoideconstruire/cancellable-promise"></script>
You can specify a npm release with
<script src="https://unpkg.com/@permettezmoideconstruire/cancellable-promise@0.0.1"></script>
// Import
import {
cancellablePromise,
CancelError,
CancelToken
} from '@permettezmoideconstruire/cancellable-promise'
// --- OR ---
const {
cancellablePromise,
CancelError,
CancelToken
} = require('@permettezmoideconstruire/cancellable-promise').default
// Wrap a promise
const initialPromise = SOMETHING_ASYNC()
const cancelToken = new CancelToken()
const wrappedPromise = cancellablePromise(initialPromise, cancelToken)
// Somewhere, cancel the promise...
cancelToken.cancel()
//Then catch it
wrappedPromise
.then((res) => {
//Actual, usual fulfill
})
.catch((err) => {
if(err instanceOf CancelError) {
//Handle cancel error
}
//Handle actual, usual error
})
ES6 source files
|
|
webpack
|
+--- babel, eslint
|
ready to use
library
in umd format
npm run compile
- produce builds for the appnpm run test
- run testsnpm run build
- compile and run testsnpm run dev
- produces development version of your library and runs a watchernpm run test:watch
- run tests in watch modeNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
84 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More