Options
All
  • Public
  • Public/Protected
  • All
Menu

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?: undefined | number): string
  • Generate a 12 byte id buffer used in ObjectID's.

    Parameters

    • Optional time: undefined | number

    Returns 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