MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / generateIdSeed

Function generateIdSeed

webapp/_webapp/src/libs/helpers.ts:74–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73// Generate ID functions
74export function generateIdSeed() {
75 const pid = Math.floor(Math.random() * 32767).toString(16);
76 const machine = Math.floor(Math.random() * 16777216).toString(16);
77 const timestamp = Math.floor(new Date().valueOf() / 1000).toString(16);
78 return (
79 "00000000".substr(0, 8 - timestamp.length) +
80 timestamp +
81 "000000".substr(0, 6 - machine.length) +
82 machine +
83 "0000".substr(0, 4 - pid.length) +
84 pid
85 );
86}
87
88export function generateId() {
89 return generateIdSeed() + "000001";

Callers 1

generateIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected