
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.
Yapa is an implementation of Promises/A+ with some extra methods bolted on. It passes the Promises/A+ Compliance Test Suite.
$ npm install yapa
var yapa = require('yapa');
Constructs a new promise, but you probably already knew that.
var promise = new yapa.Promise();
Transitions promise from pending state to fulfilled state. The promise's onFulfilled callbacks will be invoked in the order they were attached. value will be the argument passed to the promise's onFulfilled callbacks.
promise.fulfill('42');
Transitions promise from pending state to rejected state. The promise's onRejected callbacks will be invoked in the order they were attached. reason will be the argument passed to the promise's onRejected callbacks.
promise.reject(new Error('cannot compute'));
Provides an interface for accessing the promise's current or eventual fulfillment value or rejection reason. When the promise is fulfilled or rejected, the corresponding callback will be invoked. If the promise has already been fulfilled or rejected, the corresponding callback will be invoked on the next loop through the event queue.
var onFulfilled = function(value) { /* celebrate! */ }
, onRejected = function(reason) { /* mourn */ };
promise.then(onFulfilled, onRejected);
Sugar for then(null, onRejected).
Similar to the then method, however rather than have onFulfilled's argument list only consist of the promise's fulfillment value, its argument list consists of the promise's fulfillment value and the fulfillment values of all of the preceding promises in the promise chain.
promise
.then(function() { return 123; })
.then(function() { return 'do re mi'; })
.values(function(start, easyAs, simpleAs) {
console.log(start);
console.log('easy as %s', easyAs);
console.log('simple as %s', simpleAs);
});
promise.fulfill('abc');
$ cd yapa
$ npm test
Found a bug? Create an issue on GitHub.
https://github.com/jharding/yapa/issues
For transparency and insight into the release cycle, releases will be numbered with the follow format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
For more information on semantic versioning, please visit http://semver.org/.
Copyright (c) 2013 Jake Harding
Licensed under the MIT License.
FAQs
Yet another Promises/A+ implementation.
The npm package yapa receives a total of 6 weekly downloads. As such, yapa popularity was classified as not popular.
We found that yapa 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.