4 ms·
String.prototype.endsWith is native [0], it was added as part of ES2015. If you're supporting older platforms, you need to polyfill it. [0] https://developer.m
by TheAceOfHearts 10y ago
String.prototype.endsWith is native [0], it was added as part of ES2015. If you're supporting older platforms, you need to polyfill it.
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- jorblumesea 10y agoHow well supported is ES6 across browsers? Chrome for sure. Not sure about FF or IE.
- astrodust 10y agoYou can transpile to ES5 if you've got compatibility issues. Not really a problem.
- aredherring 10y agoTranspiling usually concerns syntax. Babel won't transpile .endsWith to a polyfill for you, hence the existence of that package
- gildas 10y agoThe support is quite good today, see https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/.