1.0.0 • Published 11 years ago

discountable v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
11 years ago

discountable

Usage

var discountable = require('discountable');
discountable(amountInCents, percentOff, amountOffInCents);

Accepts either percentOff or amountOffInCents. If both are given, percentOff will be used.

Examples

var discountable = require('discountable');
discountable(10, 100); // => 0
discountable(10, 50); // => 5
discountable(10, null, 6); // => 4
discountable(10, null, 11); // => 0
discountable(10, null, 5.5); // => 4.5

LICENSE

MIT