blob: d6485a43bc34e364d395b9fca636111a3460ba2d (
plain)
1
2
3
4
5
6
7
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));
};
|