Buffer object for JavaScript