function requireSize(value, property) {
  const size = requireNumberArray(value, property);
  if (size.length !== 2) {
    throw new Error(`Expected an array of two numbers for ${property}`);
  }
  return size;
}
@param {any} value The value.
@param {string} property The property.
@return {Array<number>} A number or an array of two numbers.