Takaro - v0.4.11
    Preparing search index...

    Function toLength

    • Converts value to an integer suitable for use as the length of an array-like object.

      Note: This method is based on ToLength.

      Parameters

      • value: any

        The value to convert.

      Returns number

      Returns the converted integer.

      _.toLength(3);
      // => 3

      _.toLength(Number.MIN_VALUE);
      // => 0

      _.toLength(Infinity);
      // => 4294967295

      _.toLength('3');
      // => 3