Calculates bytes size of input string
(value: string)
| 253 | |
| 254 | /** Calculates bytes size of input string */ |
| 255 | function utf8Length(value: string): number { |
| 256 | // eslint-disable-next-line no-bitwise |
| 257 | return ~-encodeURI(value).split(/%..|./).length; |
| 258 | } |
| 259 | |
| 260 | /** Calculates bytes size of input object */ |
| 261 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |