Package xid is a globally unique id generator library, ready to safely be used directly in your server code. Xid uses the Mongo Object ID algorithm to generate globally unique ids with a different serialization (base32hex) to make it shorter when transported as a string: https://docs.mongodb.org/manual/reference/object-id/ 4-byte value representing the seconds since the Unix epoch, 3-byte machine