[SERVER-19369] Add String.includes() polyfill Created: 13/Jul/15 Updated: 19/Sep/15 Resolved: 30/Jul/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.7 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Pulo | Assignee: | Jonathan Reams |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Build 7 08/10/15 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 30/Jul/15 ] |
|
Author: {u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}Message: |