
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Note: I'm not maintaining this library anymore, since Promises/A+ are broken for me. I recommend using monadic promises and monad combinators instead.
Sweetly small promises/a+ implementation.
Should work fine in ES3.
var pinky = require('pinky')
var eventual = pinky()
var eventual2 = eventual.then( function(a){ return a + 1 }
, function(a){ return a - 1 })
eventual.fulfill(10)
eventual2.then( console.log.bind(console, 'ok:')
, console.log.bind(console, 'failed:'))
// => ok: 11
Just grab it from NPM:
$ npm install pinky
Tests only run on Node right now, so just:
$ npm test
The promises/a+ specification requires things to be asynchronous. To do that,
Pinky uses process.nextTick in Node.js, and setImmediate in a DOM
environment. However, setImmediate is a Microsoft thing, and it's unlikely to
be implemented anywhere else, and in that case we fall back to the slow
setTimeout. Thus, providing a fallback for setImmediate might speed things
up a bit.
A quick reference of the API can be built using Calliope:
$ npm install -g calliope
$ calliope build
You can run all tests using Mocha:
$ npm test
MIT/X11. ie.: do whatever you want.
Most promise implementations I've seen plainly do way too much. OTOH Minimal promise implementations (like PinkySwear) provide a terrible API, which really sucks.
So, I wrote Pinky to be a minimal and fast baseline for extensions to promises/a+. Some implementation ideas are taken straight out from avow, btw, but I might revisit this in the future and try to optimise things.
FAQs
Sweetly small promises/a+ implementation.
We found that pinky 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.