@eddaic/nestjs-decorators
Version:
Additional decorators intended for use with NestJS framework.
15 lines (14 loc) • 414 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.round = round;
const enum_1 = require("../enum");
function round(value, rounding) {
switch (rounding) {
case enum_1.RoundingPolicy.CEIL:
return Math.ceil(value);
case enum_1.RoundingPolicy.FLOOR:
return Math.floor(value);
default:
return Math.round(value);
}
}