Skip to content

Commit f34e393

Browse files
committed
refactor(requirements): transform results w/out underscore
1 parent 1abb841 commit f34e393

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cordova/requirements.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
under the License.
1818
*/
1919

20-
const { object: zipObject } = require('underscore');
2120
const cordova_util = require('./util');
2221
const { CordovaError } = require('cordova-common');
2322
const knownPlatforms = require('../platforms/platforms');
@@ -37,7 +36,11 @@ module.exports = function check_reqs (platforms) {
3736

3837
return Promise.all(
3938
normalizedPlatforms.map(getPlatformRequirementsOrError)
40-
).then(results => zipObject(normalizedPlatforms, results));
39+
).then(results =>
40+
normalizedPlatforms.reduce((acc, platform, idx) =>
41+
Object.assign(acc, { [platform]: results[idx] })
42+
, {})
43+
);
4144
});
4245
};
4346

0 commit comments

Comments
 (0)