lib/transform/standardize.js
function mustBeNonEmptyArray(filter, keyword, field) {
  if (!Array.isArray(filter[field])) {
    return Bluebird.reject(new BadRequestError(`Attribute "${field}" in "${keyword}" must be an array`));
  }

  if (filter[field].length === 0) {
    return Bluebird.reject(new BadRequestError(`Attribute "${field}" in  "${keyword}" cannot be empty`));
  }

  return Bluebird.resolve();
}
function mustBeNonEmptyArray(filter, keyword, field) {
  if (!Array.isArray(filter[field])) {
    return Bluebird.reject(new BadRequestError(`Attribute "${field}" in "${keyword}" must be an array`));
  }

  if (filter[field].length === 0) {
    return Bluebird.reject(new BadRequestError(`Attribute "${field}" in  "${keyword}" cannot be empty`));
  }

  return Bluebird.resolve();
}
function mustBeNonEmptyArray ( filter , keyword , field ) { if ( ! Array . isArray ( filter [ field ] ) ) { return Bluebird . reject ( new BadRequestError ( ` ${ field } ${ keyword } ` ) ) ; } if ( filter [ field ] . length === 0 ) { return Bluebird . reject ( new BadRequestError ( ` ${ field } ${ keyword } ` ) ) ; } return Bluebird . resolve ( ) ; }
Verifies that filter.field is an array
@param filter
@param keyword
@param field
@returns {Promise}
Verifies that filter . field is an array