Socket
Socket
Sign inDemoInstall

mock-promises

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.1 to 0.6.2

14

lib/mock-promises.js

@@ -293,3 +293,3 @@ (function (root, factory) {

each(contractsTracker.forPromise(promise), function(contract) {
contractsTracker.add(extend(contract, {promise: value}));
contractsTracker.addIfUnique(extend(contract, {promise: value}));
});

@@ -363,2 +363,14 @@ }

this.addIfUnique = function(options) {
var dupe = false;
each(this.forPromise(options.promise), function(contract) {
if(contract.thenPromise === options.thenPromise) {
dupe = true;
}
});
if(dupe) return;
return this.add(options);
};
this.all = function() {

@@ -365,0 +377,0 @@ return contracts;

2

package.json
{
"name": "mock-promises",
"version": "0.6.1",
"version": "0.6.2",
"author": "Charles Hansen <chansen87@gmail.com>",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc