After searching for a while for a unique javascript id generator, here is the best I found
NOTE: This format of 8 chars, followed by 3 groups of 4 chars, followed by 12 chars is known as a UUID and is defined in RFC4122 and is a standard for generating unique IDs. This function DOES NOT implement this standard. It simply outputs a string that looks similar. The standard is found here: https://www.ietf.org/rfc/rfc4122.txt