Polyfills for string.startsWith, available on bower.
This method has been added to the ECMAScript 6 specification and may not be available in all JavaScript implementations yet. Have a look there for compat table : https://kangax.github.io/es5-compat-table/es6/#String.prototype.startsWith
bower install string.startsWith --save
Include this file:
src/string.startsWith.js
Karma tests are available and can be runned with:
karma start
This will generate the code coverage report and the documentation.
WTFPL. Do what you want with this.
- Mozilla to have provided the original polyfill,
- Kangax to have provided the compat table.