Function decimalPlaces

  • Computes the amount of decimals of a number. Note: Will drop trailing zeroes off a numeric value. 1.00 => 0 decimals '1.00' => 2 decimals.

    Parameters

    • value: string | number

      A value as a number or a string.

    Returns number