MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / saveLocal

Function saveLocal

assets/js/libraryapp.js:78–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77//To save data to Local Storage
78const saveLocal = () => {
79 localStorage.setItem("myLibrary", JSON.stringify(myLibrary));
80}
81
82const restoreLocal = () => {
83 myLibrary = JSON.parse(localStorage.getItem("myLibrary") || "[]");

Callers 2

displayBooksFunction · 0.85
libraryapp.jsFile · 0.85

Calls 1

stringifyMethod · 0.80

Tested by

no test coverage detected