string.startsWith() checks if a string starts with another string.
String.prototype.startsWith() checks if a string starts with another string.
This refactoring replaces index-based single-character comparison with
s === '/' becomes
What do I need to consider?
String.startsWith is an ES20215 feature. It is supported on all modern browsers, but for older browsers polyfilling might be required
- Code Assist ID (for the configuration file):
- You can configure custom keyboard shortcuts with these code action kinds:
- This code assist provides refactoring suggestions. Learn how to configure the refactoring suggestion visibility.