MCPcopy
hub / github.com/tensorflow/tensorboard / get

Function get

tensorboard/components/tf_storage/storage.ts:118–124  ·  view source on GitHub ↗
(key: string, options: StorageOptions<T> = {})

Source from the content-addressed store, hash-verified

116 const hashListeners: ListenKey[] = [];
117 const storageListeners: ListenKey[] = [];
118 function get(key: string, options: StorageOptions<T> = {}): T {
119 const {defaultValue, useLocalStorage = false} = options;
120 const value = useLocalStorage
121 ? window.localStorage.getItem(key)
122 : componentToDict(readComponent())[key];
123 return value == undefined ? _.cloneDeep(defaultValue)! : fromString(value)!;
124 }
125 function set(key: string, value: T, options: SetterOptions<T> = {}): void {
126 const {
127 defaultValue,

Callers 2

setFunction · 0.85
setComponentValueFunction · 0.85

Calls 2

componentToDictFunction · 0.90
readComponentFunction · 0.90

Tested by

no test coverage detected