var _ = require('lodash');

module.exports = function(config, reducerName, records) {
  // All given records must have a key
  var allKeys = _.all(records, config.key);
  if (!allKeys) throw new Error(reducerName + ': Expected to have all records with ' + config.key);
}

var _ = require('lodash');

module.exports = function(config, reducerName, records) {
  // All given records must have a key
  var allKeys = _.all(records, config.key);
  if (!allKeys) throw new Error(reducerName + ': Expected all records to have a value for the store\'s key `' + config.key + '`');
}

Make the "your config.key, or your data, hasn't got the right `key` field" error message a little clearer.
Make the "your config.key, or your data, hasn't got the right `key` field" error message a little clearer.
