Sha256: 9c333ddd65ccd16ccaaab1a5aadf76c3eb746f17279d43ab0e918bbcef9b0f49
Contents?: true
Size: 492 Bytes
Versions: 36
Compression:
Stored size: 492 Bytes
Contents
/*! * depd * Copyright(c) 2014 Douglas Christopher Wilson * MIT Licensed */ /** * Module exports. */ module.exports = bufferConcat /** * Concatenate an array of Buffers. */ function bufferConcat(bufs) { var length = 0 for (var i = 0, len = bufs.length; i < len; i++) { length += bufs[i].length } var buf = new Buffer(length) var pos = 0 for (var i = 0, len = bufs.length; i < len; i++) { bufs[i].copy(buf, pos) pos += bufs[i].length } return buf }
Version data entries
36 entries across 33 versions & 5 rubygems