lib/buffer.js
function integerAsBuffer(integer) {
    $.checkArgumentType(integer, 'number', 'integer');
    var bytes = [];
    bytes.push((integer >> 24) & 0xff);
    bytes.push((integer >> 16) & 0xff);
    bytes.push((integer >> 8) & 0xff);
    bytes.push(integer & 0xff);
    return new Buffer(bytes);
  }
function integerAsBuffer(integer) {
    $.checkArgumentType(integer, 'number', 'integer');
    var bytes = [];
    bytes.push((integer >> 24) & 0xff);
    bytes.push((integer >> 16) & 0xff);
    bytes.push((integer >> 8) & 0xff);
    bytes.push(integer & 0xff);
    return new Buffer(bytes);
  }
function integerAsBuffer ( integer ) { $ . checkArgumentType ( integer , 'number' , 'integer' ) ; var bytes = [ ] ; bytes . push ( ( integer >> 24 ) & 0xff ) ; bytes . push ( ( integer >> 16 ) & 0xff ) ; bytes . push ( ( integer >> 8 ) & 0xff ) ; bytes . push ( integer & 0xff ) ; return new Buffer ( bytes ) ; }
Transform a 4-byte integer into a Buffer of length 4.

@param {number} integer
@return {Buffer}
Transform a 4 - byte integer into a Buffer of length 4 .