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 clone-buffer with all npm packages installed. Try it out:

var cloneBuffer = require("clone-buffer")

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

clone-buffer v1.0.0

Easier Buffer cloning in node.

clone-buffer

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

Easier Buffer cloning in node.

Example

var cloneBuffer = require('clone-buffer');

var buffer = new Buffer('test');
var cloned = cloneBuffer(buffer);
// buffer !== cloned

API

cloneBuffer(buffer)

Takes a Buffer object and returns a clone. Throws if a non-Buffer is passed.

License

MIT

Metadata

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