add example output to readme

This commit is contained in:
Sebastian Korotkiewicz 2024-02-06 07:36:38 +01:00
parent 9b6a046829
commit cc25eb5ae0
Signed by: skorotkiewicz
GPG key ID: 5BDC557B496BDB0D

View file

@ -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' }
})();
};
```