lib/tlv.js
function getValueLength(value, constructed) {
  var lenValue = 0;
  
  if (constructed) {
    for (var i = 0; i < value.length; i++) {
      lenValue = lenValue + value[i].byteLength;
    }
  } else {
    lenValue = value.length;
  }    
  
  return lenValue;
}
function getValueLength(value, constructed) {
  var lenValue = 0;
  
  if (constructed) {
    for (var i = 0; i < value.length; i++) {
      lenValue = lenValue + value[i].byteLength;
    }
  } else {
    lenValue = value.length;
  }    
  
  return lenValue;
}
function getValueLength ( value , constructed ) { var lenValue = 0 ; if ( constructed ) { for ( var i = 0 ; i < value . length ; i ++ ) { lenValue = lenValue + value [ i ] . byteLength ; } } else { lenValue = value . length ; } return lenValue ; }
Returns the byte length of the given value.
Value can be either a Buffer or an array of TLVs.

@param {object} value
@param {boolean} constructed
@return {number}
Returns the byte length of the given value . Value can be either a Buffer or an array of TLVs .