'use strict';

var _toObject = require('./_to-object-6de10e57.js');
var _objectPie = require('./_object-pie-083f2dd6.js');

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

exports._objectToArray = _objectToArray;
