Skip to content

Commit 821db0d

Browse files
committed
🚨 Fix lint errrors
1 parent 3a98d03 commit 821db0d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/random.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ const maxDateNowValue = 8.64e15 // Fun fact: This will only work until the year
55

66
/**
77
* Generate a unique key in ascending or descending sequential order
8-
*
8+
*
99
* In ascending mode it will use the Unix timestamp directly
1010
* and in descending order the maxDateNowValue (8.64e15) - Unix timestamp
1111
* to make sure key is sequential. Key will be timestamp in hex plus a 5 char random id.
12-
*
12+
*
1313
* Note: Because of the timestamp in ms, key is only sequential until a certain point i.e two keys generated in the same ms.
14+
* @param {boolean} ascending
15+
* @returns {string} randomKey
1416
*/
1517
export const generateKey = (ascending: boolean): string => {
1618

0 commit comments

Comments
 (0)