main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
791 bytes
|
Line | |
---|
1 | import root from './_root.js';
|
---|
2 |
|
---|
3 | /* Built-in method references for those with the same name as other `lodash` methods. */
|
---|
4 | var 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 | */
|
---|
32 | function isFinite(value) {
|
---|
33 | return typeof value == 'number' && nativeIsFinite(value);
|
---|
34 | }
|
---|
35 |
|
---|
36 | export default isFinite;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.