MCPcopy
hub / github.com/getredash/redash / get

Function get

client/app/lib/localOptions.js:3–9  ·  view source on GitHub ↗
(key, defaultValue = undefined)

Source from the content-addressed store, hash-verified

1const PREFIX = "localOptions:";
2
3function get(key, defaultValue = undefined) {
4 const fullKey = PREFIX + key;
5 if (fullKey in window.localStorage) {
6 return JSON.parse(window.localStorage.getItem(fullKey));
7 }
8 return defaultValue;
9}
10
11function set(key, value) {
12 const fullKey = PREFIX + key;

Callers 15

getQueryResultDataFunction · 0.70
seedDatabaseFunction · 0.50
index.jsFile · 0.50
createQueryAndAddWidgetFunction · 0.50
HelpTriggerClass · 0.50
renderMethod · 0.50
FiltersFunction · 0.50
CreateSourceDialogClass · 0.50
setValueMethod · 0.50
hasFilledExtraFieldFunction · 0.50
DynamicFormFieldFunction · 0.50
QuerySnippetDialogFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected