New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

basic-promise

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-promise - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

7

main.js

@@ -73,8 +73,3 @@ 'use strict';

};
p.last = function(){
return promises[promises.length-1];
};
p.first = function(){
return promises[0];
};
p.promises = promises;
var promisesResult = {};

@@ -81,0 +76,0 @@ var rejects = 0;

2

package.json
{
"name": "basic-promise",
"version": "0.0.6",
"version": "0.0.7",
"description": "Module promise with a simple syntax",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -14,3 +14,3 @@ ## Usage

console.log('ERROR')
}, function(){ // => The promise id complete (after rolve or reject)
}, function(){ // => The promise is complete (after resolve or reject)
console.log('COMPLETE');

@@ -29,3 +29,3 @@ });

})
.on('complete', function(){ // => The promise id complete (after rolve or reject)
.on('complete', function(){ // => The promise is complete (after resolve or reject)
console.log('COMPLETE');

@@ -69,5 +69,11 @@ });

//Only with multiple promises
p.promises; //Return an array of promises
p.eq(2); //Returns the promise to fix the position 2 (the position is 0 to infinite)
p.first(); //Return the first promise
p.last(); //Return the last promise
//trigger all
p.promises.forEach(function(promise, position){
promise.resolve('This promise is: '+position);
});
//Here execute the resolve event in the multiple promise => console.log('All the promises is resolve');
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc