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 Versions

1
56

1.4.0

Diff

Changelog

Source

1.4.0

  • Create a resolved promise: when.resolve(value) creates a resolved promise for value. See API docs.
  • Resolve/reject return something useful: deferred.resolve and deferred.reject now return a promise for the fulfilled or rejected value.
  • Resolve a deferred with another promise: deferred.resolve(promise) - when promise resolves or rejects, so will deferred.
cujojs
published 1.3.0 •

Changelog

Source

1.3.0

  • Fixed a deviation from the Promises/A spec where returning undefined from a callback or errback would cause the previous value to be forwarded. See #31
    • This could be a breaking change if you depended on this behavior. If you encounter problems, the solution is to ensure that your promise callbacks (registered either with when() or .then()) return what you intend, keeping in mind that not returning something is equivalent to returning undefined.
  • This change also restores compatibility with the promises returned by jQuery.get(), which seem to reject with themselves as the rejection value. See issue #41 for more information and discussion. Thanks to @KidkArolis for raising the issue.
cujojs
published 1.2.0 •

Changelog

Source

1.2.0

  • promise.otherwise(errback) as a shortcut for promise.then(null, errback). See discussion here and here. Thanks to @jonnyreeves for suggesting the name "otherwise".
  • when/debug now detects exceptions that typically represent coding errors, such as SyntaxError, ReferenceError, etc. and propagates them to the host environment. In other words, you'll get a very loud stack trace.
1
56
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