MCPcopy Create free account
hub / github.com/appium/appium / getObjectId

Function getObjectId

packages/support/lib/node.ts:26–34  ·  view source on GitHub ↗
(object: object)

Source from the content-addressed store, hash-verified

24 * @returns A uuidV4 string that uniquely identifies given object
25 */
26export function getObjectId(object: object): string {
27 const existing = OBJECTS_MAPPING.get(object);
28 if (existing !== undefined) {
29 return existing;
30 }
31 const id = randomUUID();
32 OBJECTS_MAPPING.set(object, id);
33 return id;
34}
35
36/**
37 * Perform deep freeze of the given object (e. g.

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected