UNPKG

@golemio/parkings

Version:
15 lines 526 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MaxPriceRule = void 0; class MaxPriceRule { isValid(tariffInfo) { if (tariffInfo.pricePerHour === undefined || tariffInfo.maxParkingTime === undefined || tariffInfo.maxPrice === undefined) { return false; } return !(tariffInfo.pricePerHour * tariffInfo.maxParkingTime < tariffInfo.maxPrice); } } exports.MaxPriceRule = MaxPriceRule; //# sourceMappingURL=MaxPriceRule.js.map