discountable

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i discountable

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • speedmanly