Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A robust & optimized ES3-compatible polyfill for the `String.prototype.endsWith` method in ECMAScript 6.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 tests
Octocat-spinner-32 .gitattributes
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE-MIT.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 endswith.js
Octocat-spinner-32 package.json
README.md

ES6 String.prototype.endsWith polyfill Build status

A robust & optimized ES3-compatible polyfill for the String.prototype.endsWith method in ECMAScript 6.

Other polyfills for String.prototype.endsWith are available:

Installation

In a browser:

<script src="endswith.js"></script>

Via npm:

npm install string.prototype.endswith

Then, in Node.js:

require('string.prototype.endswith');

// On Windows and on Mac systems with default settings, case doesn’t matter,
// which allows you to do this instead:
require('String.prototype.endsWith');

Notes

Polyfills + test suites for String.prototype.startsWith and String.prototype.contains are available, too.

Author

twitter/mathias
Mathias Bynens

License

This polyfill is available under the MIT license.

Something went wrong with that request. Please try again.