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 1.7.0 to 1.7.1

3

cancelable.js

@@ -44,3 +44,3 @@ /** @license MIT License (c) copyright B Cavalier & J Hann */

// to the delegate
deferred.then(delegate.resolve, delegate.reject, delegate.progress);
deferred.promise.then(delegate.resolve, delegate.reject, delegate.progress);

@@ -52,2 +52,3 @@ // Replace deferred's promise with the delegate promise

// observe the cancellation
// TODO: Remove once deferred.then is removed
deferred.then = delegate.promise.then;

@@ -54,0 +55,0 @@

@@ -14,11 +14,4 @@ /** @license MIT License (c) copyright B Cavalier & J Hann */

*
* In an AMD environment, you can simply change your path or package mappings:
* In an AMD environment, you can simply change your package mappings:
*
* paths: {
* // 'when': 'path/to/when/when'
* 'when': 'path/to/when/debug'
* }
*
* or
*
* packages: [

@@ -70,3 +63,3 @@ * // { name: 'when', location: 'path/to/when', main: 'when' }

var args = [promise].concat(wrapCallbacks(promise, [cb, eb, pb]));
return debugPromise(when.apply(null, args), promise);
return debugPromise(when.apply(null, args), when.resolve(promise));
}

@@ -76,4 +69,4 @@

* Setup debug output handlers for the supplied promise.
* @param p {Promise} A trusted (when.js) promise
* @param parent {Promise} promise from which p was created (e.g. via then())
* @param {Promise} p A trusted (when.js) promise
* @param {Promise?} parent promise from which p was created (e.g. via then())
* @return {Promise} a new promise that outputs debug info and

@@ -146,7 +139,5 @@ * has a useful toString

* on the created Deferred, its resolver, and its promise.
* @param [id] anything optional identifier for this Deferred that will show
* up in debug output
* @return {Deferred} a Deferred with debug logging
*/
function deferDebug() {
function deferDebug(/* id */) {
var d, status, value, origResolve, origReject, origProgress, origThen, id;

@@ -252,3 +243,5 @@

if(err) {
if (err.name in exceptionsToRethrow) {
var toRethrow = (whenDebug.debug && whenDebug.debug.exceptionsToRethrow) || exceptionsToRethrow;
if (err.name in toRethrow) {
throwUncatchable(err);

@@ -281,2 +274,3 @@ }

function callGlobalHandler(handler, promise, triggeringValue, auxValue) {
/*jshint maxcomplexity:5*/
var globalHandlers = whenDebug.debug;

@@ -283,0 +277,0 @@

{
"name": "when",
"version": "1.7.0",
"version": "1.7.1",
"description": "A lightweight Promise and when() implementation, plus other async goodies.",

@@ -31,2 +31,3 @@ "keywords": ["promise", "promises", "deferred", "deferreds", "when", "async", "asynchronous", "cujo"],

"buster": "~0.6",
"jshint": "",
"promise-tests": "*"

@@ -39,7 +40,7 @@ },

"scripts": {
"test": "buster test -e node && promise-tests promises-a test/when-adapter.js",
"test-all": "buster test -e node && promise-tests all test/when-adapter.js",
"test": "jshint *.js && buster test -e node && promise-tests promises-a test/when-adapter.js",
"test-all": "jshint *.js && buster test -e node && promise-tests all test/when-adapter.js",
"start": "buster server",
"test-browser": "buster test -e browser"
"test-browser": "jshint *.js && buster test -e browser"
}
}

@@ -9,2 +9,7 @@ # when.js [![Build Status](https://secure.travis-ci.org/cujojs/when.png)](http://travis-ci.org/cujojs/when)

### 1.7.1
* Removed leftover internal usages of `deferred.then`.
* [when/debug](https://github.com/cujojs/when/wiki/when-debug) allows configuring the set of "fatal" error types that will be rethrown to the host env.
### 1.7.0

@@ -11,0 +16,0 @@

@@ -10,3 +10,3 @@ /** @license MIT License (c) copyright B Cavalier & J Hann */

*
* @version 1.7.0
* @version 1.7.1
*/

@@ -29,8 +29,8 @@

when.all = all; // Resolve a list of promises
when.some = some; // Resolve a sub-set of promises
when.any = any; // Resolve one promise in a list
when.map = map; // Array.map() for promises
when.reduce = reduce; // Array.reduce() for promises
when.any = any; // One-winner race
when.some = some; // Multi-winner race
when.chain = chain; // Make a promise trigger another resolver

@@ -577,3 +577,3 @@

* @param {Array|Promise} promise array or promise for an array of anything,
* may contain a mix of promises and values.
* may contain a mix of promises and values.
* @param {function} reduceFunc reduce function reduce(currentValue, nextValue, index, total),

@@ -580,0 +580,0 @@ * where total is the total number of items being reduced, and will be the same

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