Checks whether the target string's length (in UTF-8 bytes) falls in the defined range.
target
If the max option is undefined, it is set to Infinity.
max
Infinity
expect(isByteLength('abc', {min: 2, max: 3}).value).toBeTruthy()
The target string
The option parameters containing the min and max length of the string
Generated using TypeDoc
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 toInfinity
.Example