Create an ObjectId type
可选inputId: string | number | Uint8Array<ArrayBufferLike> | BSON.ObjectId | ObjectIdLikeCan be a 24 character hex string, 12 byte binary Buffer, or a number.
The ObjectId bytes
Compares the equality of this ObjectId with otherID.
ObjectId instance to compare against.
Returns the generation date (accurate up to the second) that this ID was generated.
Returns the ObjectId id as a 24 character hex string representation
Converts to its JSON the 24 character hex string representation.
Converts the id into a 24 character hex string for printing, unless encoding is provided.
可选encoding: "base64" | "hex"hex or base64
静态create静态create静态create静态generateGenerate a 12 byte id buffer used in ObjectId's
可选time: numberpass in a second based timestamp.
静态isChecks if a value is a valid bson ObjectId
ObjectId instance to validate.
A class representation of the BSON ObjectId type.