Best Alternative to using import in JS

You need to look at each function separately. Some may just need the removal of random. (e.g random.shuffle can be replaced with shuffle)

You might find my crib sheet and code snippets helpful.