diff --git a/assets/generator.html b/assets/generator.html new file mode 100644 index 0000000..713d134 --- /dev/null +++ b/assets/generator.html @@ -0,0 +1,71 @@ +
+
+

Online (short) UUID generator

+

Press the buttons below to generate your short uuid codes:

+ Length: + +

+ Your random UUID:   +

+ +

+ Your sequential UUID: +

+

Random Color generator

+

+ The ability to set a custom dictionary and length means that Short Unique ID is useful for many other cases such as this random color generator. +

+
+    
+      // instantiate using a dictionary containing all 16 valid hex characters
+
+      var uid = new ShortUniqueId({
+        dictionary: [
+          '0', '1', '2', '3',
+          '4', '5', '6', '7',
+          '8', '9', 'A', 'B',
+          'C', 'D', 'E', 'F',
+        ],
+      });
+
+      // or using default dictionaries available since v4.3+
+
+      var uid = new ShortUniqueId({ dictionary: 'hex' });
+
+      // then taste the rainbow 🌈
+
+      var color = '#' + uid.randomUUID(6) + ';';
+    
+  
+

+ + Your random color: +

+ + +
\ No newline at end of file diff --git a/docs/assets/generator.html b/docs/assets/generator.html new file mode 100644 index 0000000..713d134 --- /dev/null +++ b/docs/assets/generator.html @@ -0,0 +1,71 @@ +
+
+

Online (short) UUID generator

+

Press the buttons below to generate your short uuid codes:

+ Length: + +

+ Your random UUID:   +

+ +

+ Your sequential UUID: +

+

Random Color generator

+

+ The ability to set a custom dictionary and length means that Short Unique ID is useful for many other cases such as this random color generator. +

+
+    
+      // instantiate using a dictionary containing all 16 valid hex characters
+
+      var uid = new ShortUniqueId({
+        dictionary: [
+          '0', '1', '2', '3',
+          '4', '5', '6', '7',
+          '8', '9', 'A', 'B',
+          'C', 'D', 'E', 'F',
+        ],
+      });
+
+      // or using default dictionaries available since v4.3+
+
+      var uid = new ShortUniqueId({ dictionary: 'hex' });
+
+      // then taste the rainbow 🌈
+
+      var color = '#' + uid.randomUUID(6) + ';';
+    
+  
+

+ + Your random color: +

+ + +
\ No newline at end of file diff --git a/docs/classes/ShortUniqueId.html b/docs/classes/ShortUniqueId.html index f7fc66a..616e7e2 100644 --- a/docs/classes/ShortUniqueId.html +++ b/docs/classes/ShortUniqueId.html @@ -32,7 +32,7 @@

Hierarchy

+
  • Defined in index.ts:125
  • @@ -87,59 +87,59 @@

    Parameters

    argOptions: Partial<ShortUniqueIdOptions> = {}

    Returns ShortUniqueId

    +
  • Defined in index.ts:590
  • Properties

    counter: number
    +
  • Defined in index.ts:129
  • debug: boolean
    +
  • Defined in index.ts:130
  • dict: string[]
    +
  • Defined in index.ts:131
  • dictIndex: number = 0
    +
  • Defined in index.ts:133
  • dictLength: number = 0
    +
  • Defined in index.ts:137
  • dictRange: number[] = []
    +
  • Defined in index.ts:134
  • lowerBound: number = 0
    +
  • Defined in index.ts:135
  • upperBound: number = 0
    +
  • Defined in index.ts:136
  • uuidLength: number
    +
  • Defined in index.ts:138
  • version: string
    +
  • Defined in index.ts:132
  • Methods

    @@ -172,7 +172,7 @@
    rounds: Returns number
    +
  • Defined in index.ts:403
  • +
  • Defined in index.ts:376
  • +
  • Defined in index.ts:434
  • Returns string

    +
  • Defined in index.ts:323
  • +
  • Defined in index.ts:331
  • +
  • Defined in index.ts:485
  • +
  • Defined in index.ts:538
  • +
  • Defined in index.ts:294
  • Returns string

    +
  • Defined in index.ts:286
  • +
  • Defined in index.ts:260
  • +
  • Defined in index.ts:268
  • +
  • Defined in index.ts:586
  • +
  • Defined in index.ts:212
  • +
  • Defined in index.ts:501
  • +
  • Defined in index.ts:467
  • +
  • Defined in index.ts:46
  • debug: boolean
    @@ -58,7 +58,7 @@
    +
  • Defined in index.ts:40
  • dictionary: string[] | ShortUniqueIdDefaultDictionaries
    @@ -66,7 +66,7 @@
    +
  • Defined in index.ts:34
  • length: number
    @@ -74,7 +74,7 @@
    +
  • Defined in index.ts:43
  • shuffle: boolean
    @@ -82,7 +82,7 @@
    +
  • Defined in index.ts:37
  • +
  • Defined in index.ts:18
  • +
  • Defined in index.ts:61
  • +
  • Defined in index.ts:59