@deckweiss/cart
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -13,1 +13,2 @@ import type { Handle } from '@sveltejs/kit'; | ||
export declare function removeProduct(id: string): void; | ||
export declare function removeAllProducts(): void; |
@@ -76,2 +76,7 @@ import { derived, get, writable } from 'svelte/store'; | ||
} | ||
export function removeAllProducts() { | ||
const cartContent = get(cart); | ||
cartContent.products = []; | ||
_cart.set(cartContent); | ||
} | ||
function persistCart() { | ||
@@ -78,0 +83,0 @@ const cartContent = get(_cart); |
import { type Cart, type CartMetaData, type CartProduct, type CartProductMetaData } from './types.js'; | ||
import { addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, setCartMetaData, setProduct } from './cart.js'; | ||
export { type Cart, type CartMetaData, type CartProduct, type CartProductMetaData, addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, setCartMetaData, setProduct }; | ||
import { addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, removeAllProducts, setCartMetaData, setProduct } from './cart.js'; | ||
export { type Cart, type CartMetaData, type CartProduct, type CartProductMetaData, addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, removeAllProducts, setCartMetaData, setProduct }; |
import {} from './types.js'; | ||
import { addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, setCartMetaData, setProduct } from './cart.js'; | ||
export { addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, setCartMetaData, setProduct }; | ||
import { addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, removeAllProducts, setCartMetaData, setProduct } from './cart.js'; | ||
export { addOrAppendToProduct, cart, clearCart, handle, initializeClientCart, removeProduct, removeAllProducts, setCartMetaData, setProduct }; |
{ | ||
"name": "@deckweiss/cart", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"homepage": "https://github.com/deckweiss/cart", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9107
124