lib/helpers.js
function objectToArray(object) {
    var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';

    var convertedArray = [];

    Object.keys(object).forEach(function (_key) {
      var item = object[_key];
      item[key] = _key;
      convertedArray.push(item);
    });

    return convertedArray;
  }
function objectToArray(object) {
    var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';

    var convertedArray = [];

    Object.keys(object).forEach(function (_key) {
      var item = object[_key];
      item[key] = _key;
      convertedArray.push(item);
    });

    return convertedArray;
  }
function objectToArray ( object ) { var key = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : 'id' ; var convertedArray = [ ] ; Object . keys ( object ) . forEach ( function ( _key ) { var item = object [ _key ] ; item [ key ] = _key ; convertedArray . push ( item ) ; } ) ; return convertedArray ; }
converts an object to an array
converts an object to an array