You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
629 B

4 years ago
  1. var createRelationalOperation = require('./_createRelationalOperation');
  2. /**
  3. * Checks if `value` is less than or equal to `other`.
  4. *
  5. * @static
  6. * @memberOf _
  7. * @since 3.9.0
  8. * @category Lang
  9. * @param {*} value The value to compare.
  10. * @param {*} other The other value to compare.
  11. * @returns {boolean} Returns `true` if `value` is less than or equal to
  12. * `other`, else `false`.
  13. * @see _.gte
  14. * @example
  15. *
  16. * _.lte(1, 3);
  17. * // => true
  18. *
  19. * _.lte(3, 3);
  20. * // => true
  21. *
  22. * _.lte(3, 1);
  23. * // => false
  24. */
  25. var lte = createRelationalOperation(function(value, other) {
  26. return value <= other;
  27. });
  28. module.exports = lte;