Meteor package that adds promise support to subcriptions
meteor add maximum:promise-subscribe
promiseSubscribe
will call the subscribe
method on this
. So may you have call promiseSubscribe
with a this
value which implements a subscribe
method.
import { promiseSubscribe } from 'meteor/maximum:promise-subscribe';
promiseSubscribe.call(Meteor, 'my-publication', arg1, arg2).then(() => {
console.log('subscription ready');
}).catch((error) => {
console.log('subscription failed', error);
})
Licensed under MIT license. Copyright (c) 2016 Max Nowack
Contributions are welcome. Please open issues and/or file Pull Requests.
- Max Nowack (maxnowack)