Create and initialize a nuid.

Api

private

Hierarchy

  • Nuid

Constructors

Properties

Methods

Constructors

  • Returns Nuid

Properties

buf: Uint8Array
inc: number
inited: boolean
seq: number

Methods

  • Fills the sequence part of the nuid as base36 from this.seq.

    Api

    private

    Returns void

  • Initializes a nuid with a crypto random prefix, and pseudo-random sequence and increment.

    Api

    private

    Returns void

  • Initializes the pseudo randmon sequence number and the increment range.

    Api

    private

    Returns void

  • Returns the next nuid.

    Api

    private

    Returns string

  • Returns void

  • Sets the prefix from crypto random bytes. Converts to base36.

    Api

    private

    Returns void

Generated using TypeDoc