Version 1
[yaffs-website] / node_modules / core-js / modules / _string-context.js
diff --git a/node_modules/core-js/modules/_string-context.js b/node_modules/core-js/modules/_string-context.js
new file mode 100644 (file)
index 0000000..5f51348
--- /dev/null
@@ -0,0 +1,8 @@
+// helper for String#{startsWith, endsWith, includes}
+var isRegExp = require('./_is-regexp')
+  , defined  = require('./_defined');
+
+module.exports = function(that, searchString, NAME){
+  if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
+  return String(defined(that));
+};
\ No newline at end of file