A quick way to generate a random alphanumeric, numeric or alphabetical strings of any length. I think I probably sourced it from StackOverflow or some forum thread, but I use it a lot - thought it might be worth sharing.
npm install generaterandom
All functions include uppercase and lowercase letters. It's easy to adjust the potential characters yourself.
var generaterandom = ;generaterandom; //returns pure alphabet string 5 letters longgeneraterandom; //returns 2 digit numbergeneraterandom; //returns alphanumeric (letters and numbers) string of length 32