semblance_backup/node_modules/date-fns/_lib/getRoundingMethod.js
2025-12-19 19:26:16 +00:00

11 lines
284 B
JavaScript
Executable file

"use strict";
exports.getRoundingMethod = getRoundingMethod;
function getRoundingMethod(method) {
return (number) => {
const round = method ? Math[method] : Math.trunc;
const result = round(number);
// Prevent negative zero
return result === 0 ? 0 : result;
};
}