'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = objectToTupleArray;

var _foreach;

function _load_foreach() {
  return _foreach = _interopRequireDefault(require('../object/foreach'));
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * cast an object to tupple array.
 * @name objectToTupleArray
 * @param {*} obj 
 * @returns [[string, *]] tuple array representing given object 
 * @example
 * ```js
 *  objectToTupleArray({foo: 'bar', bar: 'foo'}) // => [['foo', 'bar'], ['bar', 'foo']]
 * ```
 */
function objectToTupleArray(obj) {
  var arr = [];
  (0, (_foreach || _load_foreach()).default)(obj, function (val, key) {
    arr.push([key, val]);
  });
  return arr;
}