Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mock-promises

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-promises - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

16

lib/mock-promises.js

@@ -17,2 +17,6 @@ (function() {

var isFunction = function(obj) {
return typeof obj == 'function' || false;
};
var MockPromise, OriginalPromise, originalThen;

@@ -170,5 +174,11 @@

function resolvePromise(promise, value) {
promise.isFulfilled = function(){return true;};
promise.isRejected = function(){return false;};
promise.inspect = function() {return {value: value};}
if(isFunction(value.then)) {
extend(promise, value);
} else {
extend(promise, {
isFulfilled: function(){return true;},
isRejected: function(){return false;},
inspect: function() {return {value: value};}
});
}
}

@@ -175,0 +185,0 @@

2

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

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

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