lib/common/action-creators.js
function makeEntityActionCreator(type, entity) {
  for (var _len3 = arguments.length, keys = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
    keys[_key3 - 2] = arguments[_key3];
  }

  if (!type) throw new Error('Type cannot be null/undefined');
  if (!entity) throw new Error('Entity cannot be null/undefined');
  return function () {
    for (var _len4 = arguments.length, values = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
      values[_key4] = arguments[_key4];
    }

    return generateAction({
      type: type,
      entity: entity
    }, keys, values);
  };
}
function makeEntityActionCreator(type, entity) {
  for (var _len3 = arguments.length, keys = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
    keys[_key3 - 2] = arguments[_key3];
  }

  if (!type) throw new Error('Type cannot be null/undefined');
  if (!entity) throw new Error('Entity cannot be null/undefined');
  return function () {
    for (var _len4 = arguments.length, values = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
      values[_key4] = arguments[_key4];
    }

    return generateAction({
      type: type,
      entity: entity
    }, keys, values);
  };
}
Identical to makeActionCreator(), however this function expects the second
argument to be the name of an entity.
@param type              Redux action type
@param entity            Model entity name (e.g 'users', 'orders', 'foobar')
@returns {Function}      Action creator that contains an entity key