lib/index.js
function strArray(array) {
  if (Array.isArray(array)) {
    array = array.filter(isString);
    return array.length ? array : null;
  }
  return isString(array) ? [array] : null;
}
function strArray(array) {
  if (Array.isArray(array)) {
    array = array.filter(isString);
    return array.length ? array : null;
  }
  return isString(array) ? [array] : null;
}
function strArray ( array ) { if ( Array . isArray ( array ) ) { array = array . filter ( isString ) ; return array . length ? array : null ; } return isString ( array ) ? [ array ] : null ; }
Coerce the input to an array of strings. If the input is a string, wrap it in
an array. If the input is a string, filter out all the non-string elements.
If we end up with an empty array, return null.

@param {*} array
@return {?Array<String>} The output array.
Coerce the input to an array of strings . If the input is a string wrap it in an array . If the input is a string filter out all the non - string elements . If we end up with an empty array return null .