meteor-promise
meteor-promise copied to clipboard
DEPRECATED: Use deanius:promise instead
Deprecated
WARNING: Use deanius:meteor-promise package at https://github.com/deanius/meteor-promise
Demo
The demo-enabled README is at http://okgrow-promise.meteor.com/
API
The okgrow:promise package gives you the following functionality:
Meteor.promise- The same asMeteor.call, but you omit the callback parameter, and it returns aPromisefor the resultMeteor.wrapPromise- Takes any callback-style function, and returns a Promise-returning function. This is likeMeteor.wrapAsync, but useful on the client.HTTP.getPromise- All methods on the HTTP object will have Promise-returning versions, just appendPromiseonto the method name.Meteor.subscribe- The object returned byMeteor.subscribewill have areadyPromiseproperty which resolves whenready()returnstrue.ReactivePromise- A function to wrap Promise-returning functions with, to create reactive functions - such as helpers - which update when their promised value becomes available.
Thoughts? Questions? Open an issue in okgrow:promise, and let's discuss. Or find me on social media. Thanks for your interest!