allow //js_only flag, also translate stringr::str_length