UNPKG

core-js

Version:
8 lines (7 loc) 310 B
// helper for String#{startsWith, endsWith, includes} var defined = require('./$.defined') , cof = require('./$.cof'); module.exports = function(that, searchString, NAME){ if(cof(searchString) == 'RegExp')throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); };