Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Nuid

import { Nuid } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.27.0/nats-base-client/internal_mod.ts";

Create and initialize a nuid.

class Nuid {
constructor();
buf: Uint8Array;
inc: number;
inited: boolean;
seq: number;
 
private fillSeq();
private init();
private initSeqAndInc();
private setPre();
next(): string;
reset();
}

§Constructors

§
new Nuid()
[src]

§Properties

§
buf: Uint8Array
[src]
§
inc: number
[src]
§
inited: boolean
[src]
§
seq: number
[src]

§Methods

§
fillSeq() private
[src]

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

§
init() private
[src]

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

§
initSeqAndInc() private
[src]

Initializes the pseudo randmon sequence number and the increment range.

§
setPre() private
[src]

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

§
reset()
[src]