update js impl of String.split