lib/event-stream/alloc-buffer.js
function allocBuffer(size) {
    if (typeof size !== 'number') {
        throw new Error('size passed to allocBuffer must be a number.');
    }
    var buffer = typeof Buffer.alloc === 'function' ? Buffer.alloc(size) : new Buffer(size);
    buffer.fill(0);
    return buffer;
}
function allocBuffer(size) {
    if (typeof size !== 'number') {
        throw new Error('size passed to allocBuffer must be a number.');
    }
    var buffer = typeof Buffer.alloc === 'function' ? Buffer.alloc(size) : new Buffer(size);
    buffer.fill(0);
    return buffer;
}
function allocBuffer ( size ) { if ( typeof size !== 'number' ) { throw new Error ( 'size passed to allocBuffer must be a number.' ) ; } var buffer = typeof Buffer . alloc === 'function' ? Buffer . alloc ( size ) : new Buffer ( size ) ; buffer . fill ( 0 ) ; return buffer ; }
Allocates a buffer.
@param {number} size Number of bytes to allocate for the buffer.
@returns {Buffer}
Allocates a buffer .