Smart completion for JavaScript