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.
create-thenable
Advanced tools
Create a thenable for a given Promise
$ npm install --save create-thenable
var thenable = require('create-thenable')(require('bluebird'))
return thenable.catch(errHandlers).then(handler)
The returned thenable
has a then
method that creates a new promise. It also proxies methods from the prototype and guarantees the presence of catch
and finally
. When these proxied methods are called, they call then
to create the promise and then call the method on the result. That way you can do this:
var thenable = createThenable(require('bluebird'), function () {
resolve('foo')
})
thenable.tap(function () {
console.log('succeeded')
})
.then(function (value) {
assert(value, 'foo')
})
thenable
isn't a true Bluebird Promise
but you can still trigger its methods as if it were.
createThenable(Promise, resolver)
-> thenable
Required
Type: function
A Promise constructor
Required
Type: function
The resolver function to pass to the Promise constructor
MIT © Ben Drucker
FAQs
Create a thenable for a given Promise prototype
The npm package create-thenable receives a total of 11,782 weekly downloads. As such, create-thenable popularity was classified as popular.
We found that create-thenable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.