Extract deferredToPromise
This commit is contained in:
3
js/modules/deferred_to_promise.js
Normal file
3
js/modules/deferred_to_promise.js
Normal file
@@ -0,0 +1,3 @@
|
||||
exports.deferredToPromise = deferred =>
|
||||
// eslint-disable-next-line more/no-then
|
||||
new Promise((resolve, reject) => deferred.then(resolve, reject));
|
Reference in New Issue
Block a user