function sliceObject(info, max) {
  if (!info) {
    return {};
  }
  var keys = Object.keys(info);
  if (keys.length < max) {
    return info;
  }
  return keys.slice(0, max).reduce(function (acc, key) {
    acc[key] = info[key];
    return acc;
  }, {});
}

export { sliceObject };
