async suggestion generation in JS