UNPKG

beerbay-math

Version:

29 lines (23 loc) 674 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getProductQuantity = exports.getProductPrice = void 0; /** * @method getProductPrice * @description Given a Product, return the price * @param {any} product */ var getProductPrice = function getProductPrice(product) { return parseFloat(product.price); }; /** * @method getProductQuantity * @description Given a Product in cart, return the quantity * @param {any} product */ exports.getProductPrice = getProductPrice; var getProductQuantity = function getProductQuantity(product) { return parseInt(product.quantity); }; exports.getProductQuantity = getProductQuantity;