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.
-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)
-Calculates probability of generating duplicate UUIDs (a collision) in a given number of UUID generation rounds.
Given that:
(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?".)
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
-Optional
format: stringChange the dictionary after initialization.
-Optional
shuffle: booleanChange the dictionary after initialization.
+Optional
shuffle: booleanGenerates 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
-Optional
date: DateCalculate a "uniqueness" score (from 0 to 1) of UUIDs based on size of dictionary and chosen UUID length.
Given that:
(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.)
-Validate given UID contains only characters from the instanced dictionary or optionally provided dictionary.
-Optional
dictionary: string[] | ShortUniqueIdDefaultDictionaries
Calculates approximate number of hashes before first collision.
+