Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including encoding-sleuth with all npm packages installed. Try it out:

const EncodingSleuth = require("encoding-sleuth"); const es = new EncodingSleuth(); // Analyse some bytes const span = Array.from(es.analyse(Uint8Array.from([ 65, 66, 67, // ABC 200, // unknown 220, 129, // utf8 248, 128, 128, 156, 129, // nonCanonical 237, 160, 131, // illegal 244, 163, 145, 150, // above max ]))); console.log(span);

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

encoding-sleuth v0.1.6

Scan a buffer for 7-bit safe, utf8 and non-utf8 >= 0x80 bytes returning a list of tagged spans

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free