source:
node_modules/es-toolkit/dist/compat/util/lte.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 242 bytes | |
| Line | |
|---|---|
| 1 | import { toNumber } from './toNumber.mjs'; |
| 2 | |
| 3 | function lte(value, other) { |
| 4 | if (typeof value === 'string' && typeof other === 'string') { |
| 5 | return value <= other; |
| 6 | } |
| 7 | return toNumber(value) <= toNumber(other); |
| 8 | } |
| 9 | |
| 10 | export { lte }; |
Note:
See TracBrowser
for help on using the repository browser.
