• Checks whether the target string's length (in UTF-8 bytes) falls in the defined range.

    If the max option is undefined, it is set to Infinity.

    Example

    expect(isByteLength('abc', {min: 2, max: 3}).value).toBeTruthy()
    

    Parameters

    • target: string

      The target string

    • options: IsByteLengthOptions = default_byte_length_options

      The option parameters containing the min and max length of the string

    Returns Result<boolean | undefined>

Generated using TypeDoc