Shim for ToLength.
npm install to-length-x href="https://travis-ci.org/Xotic750/to-length-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/to-length-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/to-length-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/to-length-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/to-length-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/to-length-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/to-length-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/to-length-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
Shim for ToLength.
See: 7.1.15 ToLength ( argument )
Converts value to an integer suitable for use as the length of an
array-like object. (ES2019)
Kind: static property of to-length-x
Returns: number - Returns the converted integer.
| Param | Type | Description |
| ----- | --------------- | --------------------- |
| value | \* | The value to convert. |
Example
``js``
var toLength = require('to-length-x').toLength2018;
toLength(3); // 3
toLength(Number.MIN_VALUE); // 0
toLength(Infinity); // Number.MAX_SAFE_INTEGER
toLength('3'); // 3