Fast UTF8 detector
Check utf8 using AVX2 and c++ source code from simdjson
npm install fast-is-utf8
Usage
const isUTF8 = ;const buf = Buffer;console; // => true
Benchmark
$ node benchmark.js fast-is-utf8 x 2,143,027 ops/sec ±0.37% is-utf8 x 660,326 ops/sec ±0.32% Fastest is fast-is-utf8
License
MIT