Im running a FIRESTORE database, and i want to create a random key with the same pattern as firestore does.
In the link i found the function that is called once i create a document with: 'db.ref.add()' to generate the key in client side:
I need to do something like this:
let key = newId()
console.log(key)
db.ref().doc(key).set(data)