Rename `String.prototype.contains` to `String.prototype.includes`

This commit is contained in:
Mathias Bynens 2014-11-20 10:53:18 +01:00 committed by Brian Terlson
parent a5438b0ab3
commit e2aa196a93
7 changed files with 7 additions and 7 deletions

View File

@ -193,7 +193,7 @@
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>String.prototype.contains</td> <td>String.prototype.includes</td>
<td>None</td> <td>None</td>
<td></td> <td></td>
</tr> </tr>

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if('word'.contains('w', 5) === false) { if('word'.includes('w', 5) === false) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if('word'.contains('o', 3) === false) { if('word'.includes('o', 3) === false) {
return true; return true;
} }
} }

View File

@ -11,7 +11,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if('word'.contains('a', 0) === false) { if('word'.includes('a', 0) === false) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if('word'.contains('w', 0) === true) { if('word'.includes('w', 0) === true) {
return true; return true;
} }
} }

View File

@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if('word'.contains('w') === true) { if('word'.includes('w') === true) {
return true; return true;
} }
} }

View File

@ -11,7 +11,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if('word'.contains.length === 1) { if('word'.includes.length === 1) {
return true; return true;
} }
} }