src/parse-mockdb.js
function ensureArray(object, key) {
  if (!object[key]) {
    object[key] = [];
  }
  if (!Array.isArray(object[key])) {
    throw new Error("Can't perform array operation on non-array field");
  }
}
function ensureArray(object, key) {
  if (!object[key]) {
    object[key] = [];
  }
  if (!Array.isArray(object[key])) {
    throw new Error("Can't perform array operation on non-array field");
  }
}
function ensureArray ( object , key ) { if ( ! object [ key ] ) { object [ key ] = [ ] ; } if ( ! Array . isArray ( object [ key ] ) ) { throw new Error ( "Can't perform array operation on non-array field" ) ; } }
Ensures `object` has an array at `key`. Creates array if `key` doesn't exist. Will throw if value for `key` exists and is not Array.
Ensures object has an array at key . Creates array if key doesn t exist . Will throw if value for key exists and is not Array .