forked from ard/ruoyi-api

aijinhui
2023-09-26 6642bd2b06a87e8498bc83a0cc0e2a3d8ca2a582
1
2
3
4
5
6
7
8
// helper for String#{startsWith, endsWith, includes}
var isRegExp = require('./_is-regexp');
var defined = require('./_defined');
 
module.exports = function (that, searchString, NAME) {
  if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  return String(defined(that));
};