add example output to readme
This commit is contained in:
parent
9b6a046829
commit
cc25eb5ae0
1 changed files with 2 additions and 0 deletions
|
@ -29,9 +29,11 @@ import { Snowflake, decodeSnowflake } from "@skorotkiewicz/snowflake-id";
|
|||
|
||||
const id1 = await snowflake.generate();
|
||||
console.log("encodeID", id1);
|
||||
// output: 7160521316708126720
|
||||
|
||||
const decoded = decodeSnowflake(id1);
|
||||
console.log("decodeID", decoded);
|
||||
// output: { timestamp: '2024-02-06T05:12:47.730Z', machineId: '1', sequence: '0' }
|
||||
})();
|
||||
};
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue