FIN INIT
This commit is contained in:
8
node_modules/date-fns/_lib/getRoundingMethod.js
generated
vendored
Normal file
8
node_modules/date-fns/_lib/getRoundingMethod.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export function getRoundingMethod(method) {
|
||||
return (number) => {
|
||||
const round = method ? Math[method] : Math.trunc;
|
||||
const result = round(number);
|
||||
// Prevent negative zero
|
||||
return result === 0 ? 0 : result;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user