source:
node_modules/es-toolkit/dist/compat/util/toInteger.mjs@
a762898
| Last change on this file since a762898 was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 219 bytes | |
| Line | |
|---|---|
| 1 | import { toFinite } from './toFinite.mjs'; |
| 2 | |
| 3 | function toInteger(value) { |
| 4 | const finite = toFinite(value); |
| 5 | const remainder = finite % 1; |
| 6 | return remainder ? finite - remainder : finite; |
| 7 | } |
| 8 | |
| 9 | export { toInteger }; |
Note:
See TracBrowser
for help on using the repository browser.
