Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


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

Subscribe to updates I use String.prototype.includes

Statistics on String.prototype.includes

Number of watchers on Github 62
Number of open issues 3
Average time to close an issue about 11 hours
Main language JavaScript
Open pull requests 2+
Closed pull requests 1+
Last commit over 5 years ago
Repo Created over 6 years ago
Repo Last Updated about 2 years ago
Size 276 KB
Organization / Authormathiasbynens
Page Updated
Do you use String.prototype.includes? Leave a review!
View open issues (3)
View String.prototype.includes activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating String.prototype.includes for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

ES6 String.prototype.includes polyfill Build status

A robust & optimized ES3-compatible polyfill for the String.prototype.includes method (previously known as String.prototype.contains) in ECMAScript 6.

Other polyfills for String.prototype.includes are available:


In a browser:

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

Via npm:

npm install string.prototype.includes

Then, in Node.js:


// On Windows and on Mac systems with default settings, case doesnt matter,
// which allows you to do this instead:


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


Mathias Bynens


This polyfill is available under the MIT license.

String.prototype.includes open issues Ask a question     (View All Issues)
  • over 4 years Add more test cases in Array, Object
String.prototype.includes open pull requests (View All Pulls)
  • Add bower.json
  • make CI build faster
String.prototype.includes questions on Stackoverflow (View All Questions)
  • ES6 Polyfills for Array.prototype.includes and String.prototype.includes interfering with jQuery on IE 11
  • node-webkit: unexpected "undefined is not a function" on String.prototype.includes()
  • Difference between String.prototype.includes/contains in ES6? What about .has?
  • How to test String.prototype.includes in PhantomJS
  • String.prototype.includes not converted to ES5
String.prototype.includes list of languages used
Other projects in JavaScript