We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 463df3a commit ff5e8dcCopy full SHA for ff5e8dc
repl.js
@@ -583,6 +583,9 @@ import * as os from "os";
583
base = get_context_word(line, pos);
584
if (["true", "false", "null", "this"].includes(base) || !isNaN(+base))
585
return eval(base);
586
+ // Check if `base` is a set of regexp flags
587
+ if (pos - base.length >= 3 && line[pos - base.length - 1] === '/')
588
+ return new RegExp('', base);
589
obj = get_context_object(line, pos - base.length);
590
if (obj === null || obj === void 0)
591
return obj;
0 commit comments