前端代码
This commit is contained in:
53
node_modules/lodash.isfinite/index.js
generated
vendored
Normal file
53
node_modules/lodash.isfinite/index.js
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
||||
|
||||
/** Used as a reference to the global object. */
|
||||
var root = freeGlobal || freeSelf || Function('return this')();
|
||||
|
||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
||||
var nativeIsFinite = root.isFinite;
|
||||
|
||||
/**
|
||||
* Checks if `value` is a finite primitive number.
|
||||
*
|
||||
* **Note:** This method is based on
|
||||
* [`Number.isFinite`](https://mdn.io/Number/isFinite).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a finite number,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isFinite(3);
|
||||
* // => true
|
||||
*
|
||||
* _.isFinite(Number.MIN_VALUE);
|
||||
* // => true
|
||||
*
|
||||
* _.isFinite(Infinity);
|
||||
* // => false
|
||||
*
|
||||
* _.isFinite('3');
|
||||
* // => false
|
||||
*/
|
||||
function isFinite(value) {
|
||||
return typeof value == 'number' && nativeIsFinite(value);
|
||||
}
|
||||
|
||||
module.exports = isFinite;
|
Reference in New Issue
Block a user