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

when

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

when - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

10

lib/decorators/unhandledRejection.js

@@ -69,3 +69,3 @@ /** @license MIT License (c) copyright 2010-2014 original author or authors */

if(s === '[object Object]' && typeof JSON !== 'undefined') {
s = JSON.stringify(e);
s = tryStringify(e, s);
}

@@ -75,3 +75,11 @@ }

return e instanceof Error ? s : s + ' (WARNING: non-Error used)';
}
function tryStringify(e, defaultValue) {
try {
return JSON.stringify(e);
} catch(e) {
// Ignore. Cannot JSON.stringify e, stick with String(e)
return defaultValue;
}
}

@@ -78,0 +86,0 @@

9

lib/makePromise.js

@@ -233,8 +233,7 @@ /** @license MIT License (c) copyright 2010-2014 original author or authors */

var resolver = new DeferredHandler();
var len = promises.length >>> 0;
var pending = len;
var results = [];
var pending = promises.length >>> 0;
var results = new Array(pending);
var i, h, x;
for (i = 0; i < len; ++i) {
for (i = 0; i < promises.length; ++i) {
x = promises[i];

@@ -258,3 +257,3 @@

} else {
h.chain(resolver, void 0, resolver.reject);
resolver.reject(h.value);
break;

@@ -261,0 +260,0 @@ }

@@ -74,3 +74,8 @@ /** @license MIT License (c) copyright 2010-2014 original author or authors */

log = warn = function (x) {
console.log(typeof x === 'string' ? x : JSON.stringify(x));
if(typeof x !== 'string') {
try {
x = JSON.stringify(x);
} catch(e) {}
}
console.log(x);
};

@@ -77,0 +82,0 @@ }

{
"name": "when",
"version": "3.2.0",
"version": "3.2.1",
"description": "A lightweight Promises/A+ and when() implementation, plus other async goodies.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -8,3 +8,3 @@ /** @license MIT License (c) copyright 2010-2014 original author or authors */

* @author John Hann
* @version 3.2.0
* @version 3.2.1
*/

@@ -11,0 +11,0 @@ (function(define) { 'use strict';

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