Currently the completion proposal for:
> console.log(
is: console.log(console
Which, while being a possible input, is clearly quite unlikely. In fact the likely inputs here are hard to predict.
Also the completion proposal for:
> [1, 2, 3].forEach(function(i) {
Depends on the value of the second parameter to the forEach function. Something that we currently ignore, and will be hard to get right given that it hasn't been typed yet.
So we should give up providing completions when the input contains something other than alphanumerics and dots.