From ed9b7a519e80c413eebef607efe5cbe5ab4f9175 Mon Sep 17 00:00:00 2001 From: "Jean M. Lescure" Date: Tue, 30 Apr 2024 14:16:00 -0600 Subject: [PATCH] chore: docs re-deploy --- docs/classes/ShortUniqueId.html | 30 +++++++++---------- docs/interfaces/ShortUniqueIdOptions.html | 12 ++++---- docs/interfaces/ShortUniqueIdRanges.html | 2 +- docs/interfaces/ShortUniqueIdRangesMap.html | 2 +- .../ShortUniqueIdDefaultDictionaries.html | 2 +- docs/variables/DEFAULT_OPTIONS.html | 2 +- docs/variables/DEFAULT_UUID_LENGTH.html | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/classes/ShortUniqueId.html b/docs/classes/ShortUniqueId.html index 7c5b051..8c5f74c 100644 --- a/docs/classes/ShortUniqueId.html +++ b/docs/classes/ShortUniqueId.html @@ -7,7 +7,7 @@
const options = { ... };

const uid = new ShortUniqueId(options);

For more information take a look at the ShortUniqueIdOptions type definition.

-

Constructors

Constructors

Properties

Constructors

Properties

counter: number
debug: boolean
dict: string[]
dictIndex: number = 0
dictLength: number = 0
dictRange: number[] = []
lowerBound: number = 0
upperBound: number = 0
uuidLength: number
version: string

Methods

  • Calculates approximate number of hashes before first collision.

    +

Constructors

Properties

counter: number
debug: boolean
dict: string[]
dictIndex: number = 0
dictLength: number = 0
dictRange: number[] = []
lowerBound: number = 0
upperBound: number = 0
uuidLength: number
version: string

Methods

  • Calculates approximate number of hashes before first collision.

    Given that:

    • H is the total number of possible UUIDs, or in terms of this library, @@ -50,7 +50,7 @@

      This function returns Q(H).

      (see Poisson distribution)

      -

    Parameters

    • rounds: number = ...

    Returns number

  • Calculates total number of possible UUIDs.

    +

    Parameters

    • rounds: number = ...

    Returns number

  • Calculates total number of possible UUIDs.

    Given that:

    • H is the total number of possible UUIDs
    • @@ -63,7 +63,7 @@

    This function returns H.

    -

    Parameters

    • uuidLength: number = ...

    Returns number

  • Calculates probability of generating duplicate UUIDs (a collision) in a +

    Parameters

    • uuidLength: number = ...

    Returns number

  • Calculates probability of generating duplicate UUIDs (a collision) in a given number of UUID generation rounds.

    Given that:

      @@ -82,22 +82,22 @@

      (see Poisson distribution)

      (Useful if you are wondering "If I use this lib and expect to perform at most r rounds of UUID generations, what is the probability that I will hit a duplicate UUID?".)

      -

    Parameters

    • rounds: number = ...
    • uuidLength: number = ...

    Returns number

  • Parameters

    • format: string
    • Optional date: Date

    Returns string

  • Generates custom UUID with the provided format string.

    +

    Parameters

    • rounds: number = ...
    • uuidLength: number = ...

    Returns number

  • Parameters

    • format: string
    • Optional date: Date

    Returns string

  • Generates custom UUID with the provided format string.

    Parameters

    • format: string
    • Optional date: Date

    Returns string

    Alias

    const uid = new ShortUniqueId(); uid.fmt(format: string);

    -
  • Return the version of this module.

    -

    Returns string

  • Extracts the date embeded in a UUID generated using the uid.stamp(finalLength); method.

    +
  • Return the version of this module.

    +

    Returns string

  • Extracts the date embeded in a UUID generated using the uid.stamp(finalLength); method.

     const uidWithTimestamp = uid.stamp(32);
    console.log(uidWithTimestamp);
    // GDa608f973aRCHLXQYPTbKDbjDeVsSb3

    console.log(uid.parseStamp(uidWithTimestamp));
    // 2021-05-03T06:24:58.000Z
    -

    Parameters

    • suid: string
    • Optional format: string

    Returns Date

  • Generates UUID by creating each part randomly.

    +

    Parameters

    • suid: string
    • Optional format: string

    Returns Date

  • Generates UUID by creating each part randomly.

    Parameters

    • uuidLength: number = ...

    Returns string

    Alias

    const uid = new ShortUniqueId(); uid.rnd(uuidLength: number);

    -
  • Parameters

    • uuidLength: number = ...

    Returns string

  • Generates UUID based on internal counter that's incremented after each ID generation.

    +
  • Parameters

    • uuidLength: number = ...

    Returns string

  • Generates UUID based on internal counter that's incremented after each ID generation.

    Returns string

    Alias

    const uid = new ShortUniqueId(); uid.seq();

    -
  • Set the counter to a specific value.

    -

    Parameters

    • counter: number

    Returns void

  • Generates a UUID with a timestamp that can be extracted using uid.parseStamp(stampString);.

    +
  • Set the counter to a specific value.

    +

    Parameters

    • counter: number

    Returns void

  • Generates a UUID with a timestamp that can be extracted using uid.parseStamp(stampString);.

     const uidWithTimestamp = uid.stamp(32);
    console.log(uidWithTimestamp);
    // GDa608f973aRCHLXQYPTbKDbjDeVsSb3

    console.log(uid.parseStamp(uidWithTimestamp));
    // 2021-05-03T06:24:58.000Z
    -

    Parameters

    • finalLength: number
    • Optional date: Date

    Returns string

  • Calculate a "uniqueness" score (from 0 to 1) of UUIDs based on size of +

    Parameters

    • finalLength: number
    • Optional date: Date

    Returns string

  • Calculate a "uniqueness" score (from 0 to 1) of UUIDs based on size of dictionary and chosen UUID length.

    Given that:

      @@ -115,8 +115,8 @@

      (Useful if you need a value to rate the "quality" of the combination of given dictionary and UUID length. The closer to 1, higher the uniqueness and thus better the quality.)

      -

    Parameters

    • rounds: number = ...

    Returns number

  • Validate given UID contains only characters from the instanced dictionary or optionally provided dictionary.

    -

    Parameters

    Returns boolean

\ No newline at end of file diff --git a/docs/interfaces/ShortUniqueIdOptions.html b/docs/interfaces/ShortUniqueIdOptions.html index c7a4ccd..9dad91a 100644 --- a/docs/interfaces/ShortUniqueIdOptions.html +++ b/docs/interfaces/ShortUniqueIdOptions.html @@ -1,17 +1,17 @@ ShortUniqueIdOptions | short-unique-id - v5.2.0

Interface ShortUniqueIdOptions

{
dictionary: ['z', 'a', 'p', 'h', 'o', 'd', ...],
shuffle: false,
debug: false,
length: 6,
}

interface ShortUniqueIdOptions {
    counter: number;
    debug: boolean;
    dictionary: string[] | ShortUniqueIdDefaultDictionaries;
    length: number;
    shuffle: boolean;
}

Properties

interface ShortUniqueIdOptions {
    counter: number;
    debug: boolean;
    dictionary: string[] | ShortUniqueIdDefaultDictionaries;
    length: number;
    shuffle: boolean;
}

Properties

counter: number

From 0 to infinity, the current value for the sequential UUID counter

-
debug: boolean

If true the instance will console.log useful info

-
dictionary: string[] | ShortUniqueIdDefaultDictionaries

User-defined character dictionary

-
length: number

From 1 to infinity, the length you wish your UUID to be

-
shuffle: boolean

If true, sequentialUUID use the dictionary in the given order

-
\ No newline at end of file diff --git a/docs/interfaces/ShortUniqueIdRanges.html b/docs/interfaces/ShortUniqueIdRanges.html index 421f4c6..0bcefc8 100644 --- a/docs/interfaces/ShortUniqueIdRanges.html +++ b/docs/interfaces/ShortUniqueIdRanges.html @@ -1,4 +1,4 @@ -ShortUniqueIdRanges | short-unique-id - v5.2.0

Interface ShortUniqueIdRanges

interface ShortUniqueIdRanges {
    [k: string]: [number, number];
}

Indexable

[k: string]: [number, number]

Interface ShortUniqueIdRanges

interface ShortUniqueIdRanges {
    [k: string]: [number, number];
}

Indexable

[k: string]: [number, number]
\ No newline at end of file diff --git a/docs/interfaces/ShortUniqueIdRangesMap.html b/docs/interfaces/ShortUniqueIdRangesMap.html index a963726..fa49ff4 100644 --- a/docs/interfaces/ShortUniqueIdRangesMap.html +++ b/docs/interfaces/ShortUniqueIdRangesMap.html @@ -1,4 +1,4 @@ -ShortUniqueIdRangesMap | short-unique-id - v5.2.0

Interface ShortUniqueIdRangesMap

interface ShortUniqueIdRangesMap {
    [k: string]: ShortUniqueIdRanges;
}

Indexable

[k: string]: ShortUniqueIdRanges

Interface ShortUniqueIdRangesMap

interface ShortUniqueIdRangesMap {
    [k: string]: ShortUniqueIdRanges;
}

Indexable

[k: string]: ShortUniqueIdRanges
\ No newline at end of file diff --git a/docs/types/ShortUniqueIdDefaultDictionaries.html b/docs/types/ShortUniqueIdDefaultDictionaries.html index 9eca228..d04e735 100644 --- a/docs/types/ShortUniqueIdDefaultDictionaries.html +++ b/docs/types/ShortUniqueIdDefaultDictionaries.html @@ -1,4 +1,4 @@ -ShortUniqueIdDefaultDictionaries | short-unique-id - v5.2.0

Type alias ShortUniqueIdDefaultDictionaries

ShortUniqueIdDefaultDictionaries: "number" | "alpha" | "alpha_lower" | "alpha_upper" | "alphanum" | "alphanum_lower" | "alphanum_upper" | "hex"

Type alias ShortUniqueIdDefaultDictionaries

ShortUniqueIdDefaultDictionaries: "number" | "alpha" | "alpha_lower" | "alpha_upper" | "alphanum" | "alphanum_lower" | "alphanum_upper" | "hex"
\ No newline at end of file diff --git a/docs/variables/DEFAULT_OPTIONS.html b/docs/variables/DEFAULT_OPTIONS.html index ccbd876..58ecc48 100644 --- a/docs/variables/DEFAULT_OPTIONS.html +++ b/docs/variables/DEFAULT_OPTIONS.html @@ -1,4 +1,4 @@ -DEFAULT_OPTIONS | short-unique-id - v5.2.0

Variable DEFAULT_OPTIONSConst

DEFAULT_OPTIONS: ShortUniqueIdOptions = ...

Variable DEFAULT_OPTIONSConst

DEFAULT_OPTIONS: ShortUniqueIdOptions = ...
\ No newline at end of file diff --git a/docs/variables/DEFAULT_UUID_LENGTH.html b/docs/variables/DEFAULT_UUID_LENGTH.html index 0d7d17e..e17fa97 100644 --- a/docs/variables/DEFAULT_UUID_LENGTH.html +++ b/docs/variables/DEFAULT_UUID_LENGTH.html @@ -5,7 +5,7 @@ as well as the alphabet from a to z both in UPPER and lower case, the probability of generating a duplicate in 1,000,000 rounds is ~0.00000002, or about 1 in 50,000,000.

-
\ No newline at end of file