MCPcopy
hub / github.com/graphql/graphiql / s4

Function s4

packages/graphiql-react/src/editor/tabs.ts:337–341  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335
336function guid(): string {
337 const s4 = () => {
338 return Math.floor((1 + Math.random()) * 0x10000)
339 .toString(16)
340 .slice(1);
341 };
342 // return id of format 'aaaaaaaa'-'aaaa'-'aaaa'-'aaaa'-'aaaaaaaaaaaa'
343 return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
344}

Callers 1

guidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected