MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / safeLocalStorageGet

Function safeLocalStorageGet

codebase/sources/dhtmlxscheduler.js:10331–10337  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

10329 const dateToString = scheduler2.date.date_to_str("%Y-%m-%d %H:%i");
10330 const stringToDate = scheduler2.date.str_to_date("%Y-%m-%d %H:%i");
10331 function safeLocalStorageGet(key) {
10332 try {
10333 return window.localStorage.getItem(key);
10334 } catch (e) {
10335 return null;
10336 }
10337 }
10338 function safeLocalStorageSet(key, value) {
10339 try {
10340 window.localStorage.setItem(key, value);

Callers 1

readStoredStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected