Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
ayepromise is a teeny-tiny promise library. It used to promise to pass the Promises/A+ Compliance Test Suite 1.0, but with new changes to the spec, this might only become true for 1.1 eventually in the future.
Aye tries to be fully compatible with kriskowal's Q in such a way that you can always replace aye
with Q
. It will not however try to implement anything close to the full feature set. Check test/CompatibilitySpecRunner.html
to see ayepromise's test suite executed against Q.
Allow an asyncronous function to return a promise
aPromiseReturningFunction()
.then(someOtherAsyncStuff)
.then(somethingOnTopOfAllThat)
.then(function (result) {
})
.fail(function (error) {
});
omitting the "pyramid of doom".
Make an existing "old-school" function promise aware:
var myPromisingXhr = function (url) {
var defer = aye.defer();
...
xhr.onload = function (content) {
defer.resolve(content);
};
xhr.onerror = function (e) {
defer.reject(e);
};
xhr.send();
return defer.promise;
};
For the browser, first install dependencies via npm install
and bower install
and then open test/SpecRunner.html
.
For NodeJS install dependencies via npm install
and run npm test
. This includes the Promise/A+ Compliance Test Suite.
FAQs
A teeny-tiny promise library
The npm package ayepromise receives a total of 56 weekly downloads. As such, ayepromise popularity was classified as not popular.
We found that ayepromise 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.