Version 1
[yaffs-website] / node_modules / core-js / library / modules / es6.string.includes.js
diff --git a/node_modules/core-js/library/modules/es6.string.includes.js b/node_modules/core-js/library/modules/es6.string.includes.js
new file mode 100644 (file)
index 0000000..c6b4ee2
--- /dev/null
@@ -0,0 +1,12 @@
+// 21.1.3.7 String.prototype.includes(searchString, position = 0)
+'use strict';
+var $export  = require('./_export')
+  , context  = require('./_string-context')
+  , INCLUDES = 'includes';
+
+$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {
+  includes: function includes(searchString /*, position = 0 */){
+    return !!~context(this, searchString, INCLUDES)
+      .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
+  }
+});
\ No newline at end of file