1.0.0 • Published 11 years ago
discountable v1.0.0
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
1.0.0
11 years ago