lib/helpers.js
function (str) {
      str = str.trim();
      let space = str.indexOf(' ');
      if (space === -1) {
        return str.length ? [str] : [];
      } else {
        return [str.substring(0, space).trim(), str.substring(space + 1).trim()];
      }
    }
function (str) {
      str = str.trim();
      let space = str.indexOf(' ');
      if (space === -1) {
        return str.length ? [str] : [];
      } else {
        return [str.substring(0, space).trim(), str.substring(space + 1).trim()];
      }
    }
function ( str ) { str = str . trim ( ) ; let space = str . indexOf ( ' ' ) ; if ( space === - 1 ) { return str . length ? [ str ] : [ ] ; } else { return [ str . substring ( 0 , space ) . trim ( ) , str . substring ( space + 1 ) . trim ( ) ] ; } }
take a string and parse out the part before any spaces, and anything after the first space
take a string and parse out the part before any spaces and anything after the first space