refactor: replace `indexOf === 0` with `startsWith` (#68116)
It is more readable to call `startsWith` than to call `indexOf === 0` and compare the result with zero to determine whether a string starts with a given prefix. Only these 4 lines of code still call `indexOf === 0`. Signed-off-by:Eng Zer Jun <engzerjun@gmail.com> Co-authored-by:
Sam Ko <sam@vercel.com>
Showing
Please
register
or
sign in
to comment