lib/tlv.js
function encodeNumber(buf, value, len) {
  var index = 0;
  
  while (len > 0) {
    var tmpValue = value >>> ((len - 1) * 8);
    buf[index++] = tmpValue & 0xFF;
    len--;
  }
}
function encodeNumber(buf, value, len) {
  var index = 0;
  
  while (len > 0) {
    var tmpValue = value >>> ((len - 1) * 8);
    buf[index++] = tmpValue & 0xFF;
    len--;
  }
}
function encodeNumber ( buf , value , len ) { var index = 0 ; while ( len > 0 ) { var tmpValue = value >>> ( ( len - 1 ) * 8 ) ; buf [ index ++ ] = tmpValue & 0xFF ; len -- ; } }
Encodes the given numeric value in the given Buffer, using the specified number of bytes.

@param {Buffer} buf
@param {number} value
@param {number} len
Encodes the given numeric value in the given Buffer using the specified number of bytes .