Version 1
[yaffs-website] / node_modules / core-js / library / modules / _string-context.js
1 // helper for String#{startsWith, endsWith, includes}
2 var isRegExp = require('./_is-regexp')
3   , defined  = require('./_defined');
4
5 module.exports = function(that, searchString, NAME){
6   if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
7   return String(defined(that));
8 };