@sead/price-endings
v1.0.0
Published
price endings calculator
Downloads
183
Readme
Price endings
Price endings strategy for marketing.
Installation
npm install @sead/price-endings
Usage
import { PriceEndings } from "@sead/price-endings"
const pe = new PriceEndings()
pe.zer0(3.12) // 3.10
pe.five(3.12) // 3.15
pe.eight(3.12) // 3.18
pe.nine(3.12) // 3.19
pe.parse(3.12, [0]) // 3.10
pe.parse(3.12, [99]) // 3.99
pe.parse(3.01, [9], {excludes: ['09']}) // 3.19