MCPcopy
hub / github.com/tensorflow/playground / getKeyFromValue

Function getKeyFromValue

src/state.ts:51–58  ·  view source on GitHub ↗
(obj: any, value: any)

Source from the content-addressed store, hash-verified

49};
50
51export function getKeyFromValue(obj: any, value: any): string {
52 for (let key in obj) {
53 if (obj[key] === value) {
54 return key;
55 }
56 }
57 return undefined;
58}
59
60function endsWith(s: string, suffix: string): boolean {
61 return s.substr(-suffix.length) === suffix;

Callers 2

makeGUIFunction · 0.90
serializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…