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

Function writeComponent

tensorboard/components/tf_storage/storage_utils.ts:75–87  ·  view source on GitHub ↗
(component: string, useLocationReplace = false)

Source from the content-addressed store, hash-verified

73 * Write component to URI.
74 */
75export function writeComponent(component: string, useLocationReplace = false) {
76 if (useHash()) {
77 if (useLocationReplace) {
78 const url = new URL(window.location.href);
79 url.hash = component;
80 window.history.replaceState(window.history.state, '', url.toString());
81 } else {
82 window.location.hash = component;
83 }
84 } else {
85 setFakeHash(component);
86 }
87}
88
89/**
90 * Convert dictionary of strings into a URI Component.

Callers 3

setFunction · 0.90
migrateLegacyURLSchemeFunction · 0.90
unsetFromURIFunction · 0.85

Calls 3

useHashFunction · 0.90
setFakeHashFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…