const toAsync = (promise: Promise) => promise.then(data => [null, data]).catch(err => [err]); export default toAsync;