MCPcopy
hub / github.com/shipshapecode/shepherd / uuid

Function uuid

shepherd.js/src/utils/general.ts:96–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 * Create a unique id for steps, tours, modals, etc
95 */
96export function uuid() {
97 let d = Date.now();
98 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
99 const r = ((d + Math.random() * 16) % 16) | 0;
100 d = Math.floor(d / 16);
101 return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);
102 });
103}

Callers 2

_setTourIDMethod · 0.90
_setOptionsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected