import { ObjectId } from "https://deno.land/x/web_bson@v0.2.4/src/bson.ts";
A class representation of the BSON ObjectId type.
Methods
getTimestamp(): Date
Returns the generation date (accurate up to the second) that this ID was generated.
toExtendedJSON(): ObjectIdExtended
[Symbol.for("Deno.customInspect")](): string
Static Methods
createFromHexString(hexString: string): ObjectId
Creates an ObjectId from a hex string representation of an ObjectId.
createFromTime(time: number): ObjectId
Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.
fromExtendedJSON(doc: ObjectIdExtended): ObjectId