'use strict';

var core_getIteratorMethod = require('./core.get-iterator-method-5643aa10.js');
var _objectPie = require('./_object-pie-083f2dd6.js');

var isEnum = _objectPie._objectPie.f;
var _objectToArray = function (isEntries) {
  return function (it) {
    var O = core_getIteratorMethod._toIobject(it);
    var keys = core_getIteratorMethod._objectKeys(O);
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) {
      key = keys[i++];
      if (!core_getIteratorMethod._descriptors || isEnum.call(O, key)) {
        result.push(isEntries ? [key, O[key]] : O[key]);
      }
    }
    return result;
  };
};

exports._objectToArray = _objectToArray;
