cloneBuffer.js 143 B

1234567
  1. var Buffer = require('buffer').Buffer;
  2. module.exports = function(buf) {
  3. var out = new Buffer(buf.length);
  4. buf.copy(out);
  5. return out;
  6. };