Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19369

Add String.includes() polyfill

    • Fully Compatible
    • Build 7 08/10/15

      types.js includes naive implementations of convenience helpers String.startsWith() and String.endsWith(). ES6 has these, and has also settled on "String.includes()" as the function for searching a string for a substring. This is a more readable version of .indexOf(foo) >= 0, which is what everyone otherwise does.

      Out of scope is improving these to accept the ES6 style optional second parameter to indicate where to start searching from.

            Assignee:
            jonathan.reams@mongodb.com Jonathan Reams
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: