Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Provides a single "defer()" function that returns an object that is both a
  2. deferred and a thenable promise.  It supports multiple listeners.  It does
  3. not support promise composition (since "then" returns nothing), forwarding
  4. (since "resolve" does not accept further deferred promises), and it does
  5. not support error handling (since "then" doesn't accept an errback).  It
  6. unfortunately does support multiple resolution.
  7.  
  8. For other variations and design rationales, read:
  9. https://github.com/kriskowal/q/tree/master/design
  10.  
  11. This is a modification, allowing for multiple arguments to be passed to the "resolve" method.