Skip to content

Commit

Permalink
🔖 Release v0.2.0 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Sep 13, 2021
1 parent 821db0d commit 50d234f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/random.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
* to make sure key is sequential. Key will be timestamp in hex plus a 5 char random id.
*
* Note: Because of the timestamp in ms, key is only sequential until a certain point i.e two keys generated in the same ms.
* @param {boolean} ascending
* @returns {string} randomKey
*/
export declare const generateKey: (ascending: boolean) => string;
2 changes: 2 additions & 0 deletions lib/random.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const maxDateNowValue = 8.64e15; // Fun fact: This will only work until the year
* to make sure key is sequential. Key will be timestamp in hex plus a 5 char random id.
*
* Note: Because of the timestamp in ms, key is only sequential until a certain point i.e two keys generated in the same ms.
* @param {boolean} ascending
* @returns {string} randomKey
*/
const generateKey = (ascending) => {
const timestamp = ascending ? Date.now() : maxDateNowValue - Date.now();
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deta-base-orm",
"version": "0.1.2",
"version": "0.2.0",
"description": "Basic ORM for Deta Base",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down

0 comments on commit 50d234f

Please sign in to comment.