MCPcopy Create free account
hub / github.com/SuperSimpleDev/javascript-course / saveToStorage

Function saveToStorage

2-copy-of-code/lesson-15/data/cart.js:15–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13}
14
15function saveToStorage() {
16 localStorage.setItem('cart', JSON.stringify(cart));
17}
18
19export function addToCart(productId) {
20 let matchingItem;

Callers 3

addToCartFunction · 0.70
removeFromCartFunction · 0.70
updateDeliveryOptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected