[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:
Related
related to SERVER-18796 printShardingStatus/sh.status doesn't... Closed
related to SERVER-19370 String.endsWith() shouldn't use regex... Closed
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: SERVER-19369 Add String.includes() polyfill to shell
Branch: master
https://github.com/mongodb/mongo/commit/9c76b002fed4cbb06685e556a865dba62dba7c17

Generated at Thu Feb 08 03:50:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.