MCPcopy Create free account
hub / github.com/parse-community/parse-dashboard / increment

Function increment

src/registerServiceWorker.js:25–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 * Increments the count of open dashboard tabs in localStorage.
24 */
25 const increment = () => {
26 let current = parseInt(localStorage.getItem(countKey) || '0', 10);
27 if (!navigator.serviceWorker.controller && current > 0) {
28 current = 0;
29 }
30 localStorage.setItem(countKey, String(current + 1));
31 };
32
33 /**
34 * Decrements the count of open dashboard tabs in localStorage.

Callers 1

registerServiceWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected