Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectID

Hierarchy

  • ObjectID

Index

Constructors

constructor

  • new ObjectID(s?: string | number): ObjectID

Properties

generationTime

generationTime: number

The generation time of this ObjectId instance.

Methods

equals

generate

  • generate(time?: number): string

getTimestamp

  • getTimestamp(): Date

toHexString

  • toHexString(): string

toString

  • toString(): string

Static createFromHexString

  • createFromHexString(hexString: string): ObjectID

Static createFromTime

  • 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.

    Parameters

    • time: number

    Returns ObjectID

Static isValid

  • isValid(id: any): boolean

Generated using TypeDoc