refactor(startsWith,endsWith): use polyfilled string methods