es-toolkit
Version:
A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.
15 lines (10 loc) • 352 B
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const toNumber = require('./toNumber.js');
function lte(value, other) {
if (typeof value === 'string' && typeof other === 'string') {
return value <= other;
}
return toNumber.toNumber(value) <= toNumber.toNumber(other);
}
exports.lte = lte;