MCPcopy
hub / github.com/mongodb/node-mongodb-native / uuidV4

Function uuidV4

src/utils.ts:321–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

319 * @internal
320 */
321export function uuidV4(): Uint8Array {
322 const result = crypto.getRandomValues(new Uint8Array(16));
323 result[6] = (result[6] & 0x0f) | 0x40;
324 result[8] = (result[8] & 0x3f) | 0x80;
325 return result;
326}
327
328/**
329 * A helper function for determining `maxWireVersion` between legacy and new topology instances

Callers 2

constructorMethod · 0.90
streamIdentifierFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected