mirror of
https://github.com/balkian/CORE19-01_git_cli.git
synced 2024-10-31 17:21:41 +00:00
8 lines
140 B
JavaScript
8 lines
140 B
JavaScript
// to.js
|
|
|
|
module.exports = function to(promise) {
|
|
return promise.then(data => {
|
|
return [null, data];
|
|
})
|
|
.catch(err => [err]);
|
|
}; |