elections-cpl.api.hscc.bdpa.org • Docs
elections-cpl.api.hscc.bdpa.org / src/backend/db / ElectionId
ObjectId
get
_bsontype():"ObjectId"
"ObjectId"
node_modules/bson/bson.d.ts:1230
get
id():Uint8Array
The ObjectId bytes
Uint8Array
node_modules/bson/bson.d.ts:1278
equals(
otherId
):boolean
Compares the equality of this ObjectId with otherID
.
• otherId: undefined
| null
| string
| ObjectId
| ObjectIdLike
ObjectId instance to compare against.
boolean
ObjectId.equals
node_modules/bson/bson.d.ts:1302
getTimestamp():
Date
Returns the generation date (accurate up to the second) that this ID was generated.
Date
ObjectId.getTimestamp
node_modules/bson/bson.d.ts:1304
inspect(
depth
?,options
?,inspect
?):string
Converts to a string representation of this Id.
• depth?: number
• options?: unknown
• inspect?: InspectFn
string
return the 24 character hex string representation.
ObjectId.inspect
node_modules/bson/bson.d.ts:1333
toHexString():
string
Returns the ObjectId id as a 24 lowercase character hex string representation
string
ObjectId.toHexString
node_modules/bson/bson.d.ts:1281
toJSON():
string
Converts to its JSON the 24 character hex string representation.
string
ObjectId.toJSON
node_modules/bson/bson.d.ts:1295
toString(
encoding
?):string
Converts the id into a 24 character hex string for printing, unless encoding is provided.
• encoding?: "base64"
| "hex"
hex or base64
string
ObjectId.toString
node_modules/bson/bson.d.ts:1293