index.js
function splitOne(str, sep) {
  let index = str.indexOf(sep);
  return index < 0 ? null : [str.slice(0, index), str.slice(index + sep.length)];
}
function splitOne(str, sep) {
  let index = str.indexOf(sep);
  return index < 0 ? null : [str.slice(0, index), str.slice(index + sep.length)];
}
function splitOne ( str , sep ) { let index = str . indexOf ( sep ) ; return index < 0 ? null : [ str . slice ( 0 , index ) , str . slice ( index + sep . length ) ] ; }
Split a string on the given separator just once, returning an array of two parts, or null.
Split a string on the given separator just once returning an array of two parts or null .