Skip to content
Myr

perf(utils): use `| 0` instead of `Math.floor` (#3605)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by EdamAmex · committed by GitHub · parent 8d775dc · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:src/utils/jwt/jwt.ts+1 added-1 removed
modified:src/utils/cookie.ts+1 added-1 removed
160 unmodified lines
161 throw new Error(162 'Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.'163 )164 }165 cookie += `; Max-Age=${Math.floor(opt.maxAge)}`165 cookie += `; Max-Age=${opt.maxAge | 0}`166 }167168 if (opt.domain && opt.prefix !== 'host') {169 cookie += `; Domain=${opt.domain}`
61 unmodified lines