/string.startsWith

Polyfill for string.startsWith, available on bower

string.startsWith Build Status

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

Install

bower install string.startsWith --save

Usage

Include this file:

src/string.startsWith.js

Tests

Karma tests are available and can be runned with:

karma start

This will generate the code coverage report and the documentation.

Licence

WTFPL. Do what you want with this.

Thanks to

  • Mozilla to have provided the original polyfill,
  • Kangax to have provided the compat table.