MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / get

Function get

pkg/webui/lib/cache.js:21–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19const hashKey = key => `${key}-${hash}`
20
21export const get = key => {
22 const hashedKey = hashKey(key)
23 const value = localStorage.getItem(hashedKey)
24 try {
25 return JSON.parse(value)
26 } catch (e) {
27 return value
28 }
29}
30
31export const set = (key, val) => {
32 const hashedKey = hashKey(key)

Callers 9

diff.jsFile · 0.70
setKeyIsZeroFunction · 0.50
FormFieldFunction · 0.50
index.jsFile · 0.50
handleGetModelFunction · 0.50
fullfillsSelectorFunction · 0.50
selectPubSubProvidersFunction · 0.50
index.jsFile · 0.50
index.jsFile · 0.50

Calls 1

hashKeyFunction · 0.85

Tested by

no test coverage detected