mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
# add dist
This commit is contained in:
36
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/isLength.js
generated
vendored
Normal file
36
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/isLength.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/** Used as references for various `Number` constants. */
|
||||
var MAX_SAFE_INTEGER = 9007199254740991;
|
||||
|
||||
/**
|
||||
* Checks if `value` is a valid array-like length.
|
||||
*
|
||||
* **Note:** This function is loosely based on
|
||||
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a valid length,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isLength(3);
|
||||
* // => true
|
||||
*
|
||||
* _.isLength(Number.MIN_VALUE);
|
||||
* // => false
|
||||
*
|
||||
* _.isLength(Infinity);
|
||||
* // => false
|
||||
*
|
||||
* _.isLength('3');
|
||||
* // => false
|
||||
*/
|
||||
function isLength(value) {
|
||||
return typeof value == 'number' &&
|
||||
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||||
}
|
||||
|
||||
module.exports = isLength;
|
Reference in New Issue
Block a user