Constructors
constructor
-
Parameters
-
Optional id: string | number | Buffer | ObjectId | ObjectIdLike
Properties
_bsontype
_bsontype: "ObjectId"
generationTime
generationTime: number
id
id: Buffer
Static cacheHexString
cacheHexString: boolean
Methods
equals
- equals(otherId: string | ObjectId | ObjectIdLike): boolean
-
Parameters
-
otherId: string | ObjectId | ObjectIdLike
Returns boolean
getTimestamp
-
Returns Date
inspect
-
Returns string
toHexString
-
Returns string
Static createFromHexString
- createFromHexString(hexString: string): ObjectId
-
Parameters
Static createFromTime
-
Parameters
Static generate
- generate(time?: number): Buffer
-
Parameters
Returns Buffer
Static isValid
- isValid(id: string | number | Uint8Array | ObjectId | ObjectIdLike): boolean
-
Parameters
-
id: string | number | Uint8Array | ObjectId | ObjectIdLike
Returns boolean
A class representation of the BSON ObjectId type.