• Returns an integer value from the string value, or undefined if the value cannot be converted

    Parameters

    • Optionalvalue: string

      the string value to check

    Returns number | undefined

    an integer value from the string value, or undefined if the value cannot be converted

    toInteger('1');    // 1