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

Function saveToStorage

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

Source from the content-addressed store, hash-verified

19}
20
21function saveToStorage() {
22 localStorage.setItem('cart', JSON.stringify(cart));
23}
24
25export function addToCart(productId) {
26 let matchingItem;

Callers 3

addToCartFunction · 0.70
removeFromCartFunction · 0.70
updateDeliveryOptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected