buffer: add isLatin1

Implements a fast check to determine if a string is
a valid byte string (only chars <= 0xff).

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66298
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
This commit is contained in:
James M Snell authored and Antoine du Hamel committed 2026-09-29 00:25:12 +02:00
1 parent 232f178825
commit b7f6a66a9f

Diff Content Not Available