Skip to content

Commit

Permalink
Remove String.prototype.contains polyfill
Browse files Browse the repository at this point in the history
Summary:
Now that String.prototype.includes is there, we should remove the .contains one which has not been standardized.

For fb reviewers, this needs to land after D2910339 which updates internal callsites.
Closes facebook/react-native#5794

Reviewed By: svcscm

Differential Revision: D2910855

Pulled By: vjeux

fb-gh-sync-id: 8fd216222385f038995d1ed10e8a2c4c34c7e928
  • Loading branch information
vjeux authored and facebook-github-bot-7 committed Feb 8, 2016
1 parent 96b82f4 commit f6af247
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions react-packager/src/Resolver/polyfills/String.prototype.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ if (!String.prototype.endsWith) {
};
}

if (!String.prototype.contains) {
String.prototype.contains = function(search) {
'use strict';
if (this == null) {
throw TypeError();
}
var string = String(this);
var pos = arguments.length > 1 ?
(Number(arguments[1]) || 0) : 0;
return string.indexOf(String(search), pos) !== -1;
};
}

if (!String.prototype.repeat) {
String.prototype.repeat = function(count) {
'use strict';
Expand Down

0 comments on commit f6af247

Please sign in to comment.