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 400,000 packages pre-installed, including abe with all npm packages installed. Try it out:

var abe = require("abe")

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

abe v0.0.0

Expose ArrayBuffers as read/write text streams


Create read/write streams for decoding/encoding text data from ArrayBuffer arrays.

var ArrayReadStream = require('abe').ArrayReadStream;

// lets say this is some stream which emits data as array buffers
var array_buff_stream;

// by piping the array buffer stream into our decode stream
// we will get the decoded data
var read_stream = array_buff_stream.pipe(new ArrayReadStream('utf-8'));

read_stream.on('data', function(chunk) {
    // chunk is now utf-8 data


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