Package to replace
is-utf8
Suggested replacement(s)
const decoder = new TextDecoder('utf-8', { fatal: true });
const isUtf8 = (bytes) => {
try {
decoder.decode(bytes);
return true;
} catch {
return false;
}
};
Manifest type
micro-utility (tiny utility replaceable with native code or removal)
Rationale
inlinable. this variation is even better than the og
Availability
No response
Code example (optional)
Package to replace
is-utf8Suggested replacement(s)
Manifest type
micro-utility (tiny utility replaceable with native code or removal)
Rationale
inlinable. this variation is even better than the og
Availability
No response
Code example (optional)