You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/date-fns/_lib/roundingMethods/index.js

20 lines
494 B

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getRoundingMethod = getRoundingMethod;
var roundingMap = {
ceil: Math.ceil,
round: Math.round,
floor: Math.floor,
trunc: function (value) {
return value < 0 ? Math.ceil(value) : Math.floor(value);
} // Math.trunc is not supported by IE
};
var defaultRoundingMethod = 'trunc';
function getRoundingMethod(method) {
return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
}