voucher-validator
Version:
This lib provide validator to check business rules for a voucher
12 lines • 570 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const cents_to_total_1 = __importDefault(require("./cents-to-total"));
const total_to_cents_1 = __importDefault(require("./total-to-cents"));
function CalculatePercentage(a, b) {
return (0, cents_to_total_1.default)((0, total_to_cents_1.default)(a) * b) / 100;
}
exports.default = CalculatePercentage;
//# sourceMappingURL=calculate-percentage.js.map