Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
cancelable-promise
Advanced tools
A simple Cancelable Promise for browser
npm install --save cancelable-promise
This package is based on ES6 Promise. See promise-polyfill
for browser support.
CancelablePromise acts like a ES6 Promise: you can use Promise.all
, Promise.race
with your CancelablePromise for example. The only difference is you'll have a cancel
method on your promise to cancel future execution of then
or catch
functions. CancelablePromise will also cancel all callbacks attached to new promises returned by then
/catch
.
import CancelablePromise from 'cancelable-promise';
const myPromise = new CancelablePromise((resolve) => setTimeout(() => resolve('I\'m resolved'), 100));
myPromise.then((response) => console.log(response)).then(() => console.log('not cancel'));
myPromise.cancel();
// Nothing will be displayed in console
You can run tests with npm run test
FAQs
A simple cancelable promise
The npm package cancelable-promise receives a total of 4,778 weekly downloads. As such, cancelable-promise popularity was classified as popular.
We found that cancelable-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.