'use strict';

module.exports = function (object) {
  var keys = Object.keys(object);
  var values = [];

  for (let key in object) {
    let value = object[key];
    values.push(value);
  }

  return Promise.all(values).then(function (results) {
    return keys.reduce(function (fulfilledObject, key, index) {
      fulfilledObject[key] = results[index];

      return fulfilledObject;
    }, {});
  });
};

'use strict';

module.exports = function (object) {
  var keys = Object.keys(object);
  var values = [];
  var key;

  for (key in object) {
    values.push(object[key]);
  }

  return Promise.all(values).then(function (results) {
    return keys.reduce(function (fulfilledObject, key, index) {
      fulfilledObject[key] = results[index];

      return fulfilledObject;
    }, {});
  });
};

Remove ES6 let binding usage
Remove ES6 let binding usage

This makes the module code work nicely with older (ES5) tooling.