web_modules/forge.bundle.js
function _getAttribute(obj, options) {
  if(typeof options === 'string') {
    options = {shortName: options};
  }

  var rval = null;
  var attr;
  for(var i = 0; rval === null && i < obj.attributes.length; ++i) {
    attr = obj.attributes[i];
    if(options.type && options.type === attr.type) {
      rval = attr;
    } else if(options.name && options.name === attr.name) {
      rval = attr;
    } else if(options.shortName && options.shortName === attr.shortName) {
      rval = attr;
    }
  }
  return rval;
}
function _getAttribute(obj, options) {
  if(typeof options === 'string') {
    options = {shortName: options};
  }

  var rval = null;
  var attr;
  for(var i = 0; rval === null && i < obj.attributes.length; ++i) {
    attr = obj.attributes[i];
    if(options.type && options.type === attr.type) {
      rval = attr;
    } else if(options.name && options.name === attr.name) {
      rval = attr;
    } else if(options.shortName && options.shortName === attr.shortName) {
      rval = attr;
    }
  }
  return rval;
}
function _getAttribute ( obj , options ) { if ( typeof options === 'string' ) { options = { shortName : options } ; } var rval = null ; var attr ; for ( var i = 0 ; rval === null && i < obj . attributes . length ; ++ i ) { attr = obj . attributes [ i ] ; if ( options . type && options . type === attr . type ) { rval = attr ; } else if ( options . name && options . name === attr . name ) { rval = attr ; } else if ( options . shortName && options . shortName === attr . shortName ) { rval = attr ; } } return rval ; }
Gets an issuer or subject attribute from its name, type, or short name.

@param obj the issuer or subject object.
@param options a short name string or an object with:
shortName the short name for the attribute.
name the name for the attribute.
type the type for the attribute.

@return the attribute.
Gets an issuer or subject attribute from its name type or short name .