code: 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()];
        }
      }
docs: take a string and parse out the part before any spaces, and anything after the first space