demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/toLength.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/toLength.js
Status
scanned
Type
file
Name
toLength.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
868 (868 bytes)
MD5
faf5138dd05ff4abcf57c9b381e6c33a
SHA1
9a0a62cbf4f795ff3efba1fd3b1a84cd5ec94ee1
SHA256
059994a6c98eb0e9ee6a565d00667e2068c0728bf2bf89994e06fcb13593f3d0
SHA512

      
    
SHA1_git
be8f2a7446531d09dc9e440280a675c1fbda4e9e
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
toLength.js | 868 bytes |

var baseClamp = require('./_baseClamp'), toInteger = require('./toInteger'); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; /** * Converts `value` to an integer suitable for use as the length of an * array-like object. * * **Note:** This method is based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); * // => 0 * * _.toLength(Infinity); * // => 4294967295 * * _.toLength('3.2'); * // => 3 */ function toLength(value) { return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; } module.exports = toLength;
URL Start line End line
http://ecma-international.org/ecma-262/7.0/#sec-tolength 12 12
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/lodash@4.17.20 mit JavaScript