Source code
Revision control
Copy as Markdown
Other Tools
function FakeCtor() {}
FakeCtor.prototype = RegExp.prototype;
let rx = Reflect.construct(RegExp, ["a", "y"], FakeCtor);
"abc".split(rx);
function FakeCtor() {}
FakeCtor.prototype = RegExp.prototype;
let rx = Reflect.construct(RegExp, ["a", "y"], FakeCtor);
"abc".split(rx);