src/utils.js
/**
 * Ensures an array is returned if input value is not one.
 * ensureArray(value: Any) -> Array
 */
Ensures an array is returned if input value is not one.
Ensures an array is returned if input value is not one .
function ensureArray(value) {
  if (!value) { return [] }
  if (!Array.isArray(value)) { return [] }
  return value
}
function ensureArray ( value ) { if ( ! value ) { return [ ] } if ( ! Array . isArray ( value ) ) { return [ ] } return value }
Ensures an array is returned if input value is not one.
Ensures an array is returned if input value is not one .