Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80742 views
1
/**
2
* Checks if `value` is less than or equal to `other`.
3
*
4
* @static
5
* @memberOf _
6
* @category Lang
7
* @param {*} value The value to compare.
8
* @param {*} other The other value to compare.
9
* @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.
10
* @example
11
*
12
* _.lte(1, 3);
13
* // => true
14
*
15
* _.lte(3, 3);
16
* // => true
17
*
18
* _.lte(3, 1);
19
* // => false
20
*/
21
function lte(value, other) {
22
return value <= other;
23
}
24
25
module.exports = lte;
26
27