source: trip-planner-front/node_modules/lodash/isFinite.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 793 bytes
RevLine 
[6a3a178]1var root = require('./_root');
2
3/* Built-in method references for those with the same name as other `lodash` methods. */
4var nativeIsFinite = root.isFinite;
5
6/**
7 * Checks if `value` is a finite primitive number.
8 *
9 * **Note:** This method is based on
10 * [`Number.isFinite`](https://mdn.io/Number/isFinite).
11 *
12 * @static
13 * @memberOf _
14 * @since 0.1.0
15 * @category Lang
16 * @param {*} value The value to check.
17 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
18 * @example
19 *
20 * _.isFinite(3);
21 * // => true
22 *
23 * _.isFinite(Number.MIN_VALUE);
24 * // => true
25 *
26 * _.isFinite(Infinity);
27 * // => false
28 *
29 * _.isFinite('3');
30 * // => false
31 */
32function isFinite(value) {
33 return typeof value == 'number' && nativeIsFinite(value);
34}
35
36module.exports = isFinite;
Note: See TracBrowser for help on using the repository browser.