Skip to content

Commit 50d234f

Browse files
committed
πŸ”– Release v0.2.0 [skip ci]
1 parent 821db0d commit 50d234f

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

β€Žlib/random.d.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
* to make sure key is sequential. Key will be timestamp in hex plus a 5 char random id.
77
*
88
* Note: Because of the timestamp in ms, key is only sequential until a certain point i.e two keys generated in the same ms.
9+
* @param {boolean} ascending
10+
* @returns {string} randomKey
911
*/
1012
export declare const generateKey: (ascending: boolean) => string;

β€Žlib/random.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const maxDateNowValue = 8.64e15; // Fun fact: This will only work until the year
1212
* to make sure key is sequential. Key will be timestamp in hex plus a 5 char random id.
1313
*
1414
* Note: Because of the timestamp in ms, key is only sequential until a certain point i.e two keys generated in the same ms.
15+
* @param {boolean} ascending
16+
* @returns {string} randomKey
1517
*/
1618
const generateKey = (ascending) => {
1719
const timestamp = ascending ? Date.now() : maxDateNowValue - Date.now();

β€Žpackage-lock.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deta-base-orm",
3-
"version": "0.1.2",
3+
"version": "0.2.0",
44
"description": "Basic ORM for Deta Base",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",

0 commit comments

Comments
Β (0)