@enonic/js-utils
Version:
Enonic XP JavaScript Utils
14 lines (13 loc) • 315 B
JavaScript
// string/includes.ts
function includes(string, searchString, position) {
if (searchString instanceof RegExp) {
throw new TypeError("second argument must not be a RegExp");
}
if (position === void 0) {
position = 0;
}
return string.indexOf(searchString, position) !== -1;
}
export {
includes
};