varclassof=require('./classof-raw');varregexpExec=require('./regexp-exec');// `RegExpExec` abstract operation// https://tc39.github.io/ecma262/#sec-regexpexecmodule.exports=function(R,S){varexec=R.exec;if(typeofexec==='function'){varresult=exec.call(R,S);if(typeofresult!=='object'){throwTypeError('RegExp exec method returned something other than an Object or null');}returnresult;}if(classof(R)!=='RegExp'){throwTypeError('RegExp#exec called on incompatible receiver');}returnregexpExec.call(R,S);};