Class Nuid

Nuid is a class that generates unique identifiers.

Constructors

  • Returns Nuid

Methods

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

    Returns void

    Api

    private

  • Initializes a nuid with a crypto random prefix, and pseudo-random sequence and increment. This function is only called if any api on a nuid is called.

    Returns void

    Api

    private

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

    Returns void

    Api

    private

  • Returns the next nuid.

    Returns string

  • Resets the prefix and counter for the nuid. This is typically called automatically from within next() if the current sequence exceeds the resolution of the nuid.

    Returns void

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

    Returns void

    Api

    private