From 577206fe51cf94d53cd69123ac64bf70cd2cc0ba Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Sun, 7 Feb 2016 16:41:54 -0800 Subject: [PATCH] Remove String.prototype.contains polyfill 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 https://github.com/facebook/react-native/pull/5794 Reviewed By: svcscm Differential Revision: D2910855 Pulled By: vjeux fb-gh-sync-id: 8fd216222385f038995d1ed10e8a2c4c34c7e928 --- .../src/Resolver/polyfills/String.prototype.es6.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js b/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js index c455ef1ee..59e5351d3 100644 --- a/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js +++ b/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js @@ -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';