lib/complexTypes/Tag.js
function Tag(tagDict){
  if(!(this instanceof Tag))
    return new Tag(tagDict)

  // Check tagDict has the required fields
  checkType('String', 'tagDict.key', tagDict.key, {required: true});
  checkType('String', 'tagDict.value', tagDict.value, {required: true});

  // Init parent class
  Tag.super_.call(this, tagDict)

  // Set object properties
  Object.defineProperties(this, {
    key: {
      writable: true,
      enumerable: true,
      value: tagDict.key
    },
    value: {
      writable: true,
      enumerable: true,
      value: tagDict.value
    }
  })
}
function Tag(tagDict){
  if(!(this instanceof Tag))
    return new Tag(tagDict)

  // Check tagDict has the required fields
  checkType('String', 'tagDict.key', tagDict.key, {required: true});
  checkType('String', 'tagDict.value', tagDict.value, {required: true});

  // Init parent class
  Tag.super_.call(this, tagDict)

  // Set object properties
  Object.defineProperties(this, {
    key: {
      writable: true,
      enumerable: true,
      value: tagDict.key
    },
    value: {
      writable: true,
      enumerable: true,
      value: tagDict.value
    }
  })
}
function Tag ( tagDict ) { if ( ! ( this instanceof Tag ) ) return new Tag ( tagDict ) // Check tagDict has the required fields checkType ( 'String' , 'tagDict.key' , tagDict . key , { required : true } ) ; checkType ( 'String' , 'tagDict.value' , tagDict . value , { required : true } ) ; // Init parent class Tag . super_ . call ( this , tagDict ) // Set object properties Object . defineProperties ( this , { key : { writable : true , enumerable : true , value : tagDict . key } , value : { writable : true , enumerable : true , value : tagDict . value } } ) }
Pair key-value with info about a MediaObject

@constructor module:core/complexTypes.Tag

@property {external:String} key
Tag key
@property {external:String} value
Tag Value
Pair key - value with info about a MediaObject