src/chronos/duration/bubble.ts
Function bubble
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function bubble(dur: Duration): Duration {
let milliseconds = dur._milliseconds;
let days = dur._days;
let months = dur._months;
const data = dur._data;
Consider simplifying this complex logical expression. Open
Open
if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
(milliseconds <= 0 && days <= 0 && months <= 0))) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;