Package Exports
- thepricer-utils
Readme
thepricer-utils
Tiny helpers for price explainers: formatPrice, midpoint, hoursToAfford
Homepage: https://www.thepricer.org/
Install
npm install thepricer-utilsUsage
import { formatPrice, midpoint, hoursToAfford } from "thepricer-utils";
console.log(formatPrice(12.5, { currency: "$", per: "lb" })); // "$12.50 per lb"
console.log(midpoint(9, 11)); // 10
console.log(hoursToAfford(28.5, 15)); // 1.9