MCPcopy
hub / github.com/react-grid-layout/react-grid-layout / getFromLS

Function getFromLS

test/examples/07-localstorage.jsx:71–81  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

69}
70
71function getFromLS(key) {
72 let ls = {};
73 if (global.localStorage) {
74 try {
75 ls = JSON.parse(global.localStorage.getItem("rgl-7")) || {};
76 } catch {
77 /*Ignore*/
78 }
79 }
80 return ls[key];
81}
82
83function saveToLS(key, value) {
84 if (global.localStorage) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…