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

min-promise

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

min-promise - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

2

package.json
{
"name": "min-promise",
"version": "2.1.2",
"version": "2.1.3",
"description": "Small and Clean Promise 100% compliant with Promises/A+ Spec",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -40,3 +40,4 @@ // Promises/A+: https://promisesaplus.com/

}
return ret // 2.2.7
// 2.2.7
return ret
}

@@ -52,12 +53,15 @@

// 2.3.2 2.3.3 treat promise just like thenable
// 2.3.2 2.3.3 treat promise just like thenable(object or function)
var then
try {
// 2.3.3.1 carefull, get then can crash
then = getThenFn(result)
} catch (e) {
// 2.3.3.2
return finalSetResult(promise, rejected, e)
if (is.oof(result)) {
try {
// 2.3.3.1
then = result.then
} catch (err) {
// 2.3.3.2
return finalSetResult(promise, rejected, err)
}
}
if (then) { // 2.3.3.3
if (is.fn(then)) {
// 2.3.3.3
var onceSet = _.once(function(state, result) {

@@ -106,3 +110,4 @@ // 2.3.3.3.3 2.3.3.3.4.1

var handler = promise.handlers[state]
if (is.fn(handler)) { // 2.2.1, 2.2.2, 2.2.3
if (is.fn(handler)) {
// 2.2.1, 2.2.2, 2.2.3
var value

@@ -122,12 +127,1 @@ try {

}
function getThenFn(obj) {
// 2.3.3 Otherwise, if x is an object or function
if (is.oof(obj)) {
var fn = obj.then // `.then` may be getter
if (is.fn(fn)) {
return fn
}
}
}
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