fix(dom) renameCurrent: try-to-promise RESTful.mv

This commit is contained in:
coderaiser 2019-05-15 13:48:52 +03:00
parent 6574d45939
commit 0b3348ee77
2 changed files with 23 additions and 10 deletions

View file

@ -0,0 +1,11 @@
'use strict';
const {promisify} = require('es6-promisify');
const tryToCatch = require('try-to-catch/legacy');
module.exports = (fn, ...args) => {
const promise = promisify(fn);
return tryToCatch(promise, ...args);
};