mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
13 lines
244 B
JavaScript
13 lines
244 B
JavaScript
'use strict';
|
|
|
|
const tryToCatch = require('try-to-catch');
|
|
const all = Promise.all.bind(Promise);
|
|
|
|
module.exports = async (a) => {
|
|
const [e, result = []] = await tryToCatch(all, a);
|
|
|
|
return [
|
|
e,
|
|
...result,
|
|
];
|
|
};
|