@1hive/connect-core
Version:
Access and interact with Aragon Organizations and their apps.
10 lines • 494 B
JavaScript
// This is used by methods allowing subscription. It allows to a create a
// function that either subscribes directly and return a handler if a callback
// is present, or to return a function allowing to pass the callback afterwards
// (in other terms, a partial application).
export function subscription(callback, createSubscription) {
return callback
? createSubscription(callback)
: (callback) => createSubscription(callback);
}
//# sourceMappingURL=subscriptions.js.map