add `_jsCompletion` helper function

for consistency