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

String.prototype.includes

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
Homepage https://mths.be/i...
Organization / Authormathiasbynens
Contributors1
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:

Installation

In a browser:

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

Via npm:

npm install string.prototype.includes

Then, in Node.js:

require('string.prototype.includes');

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

Notes

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

Author

twitter/mathias
Mathias Bynens

License

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