index.js
function Description(def) {
  if(typeof def === 'string') {
    this.parse(def);
  }else if(def
    && typeof def === 'object'
    && typeof def.txt === 'string'
    && typeof def.md === 'string') {
    this.md = def.md;
    this.txt = def.txt;
  }else{
    throw new Error('invalid value for description');
  }
}
function Description(def) {
  if(typeof def === 'string') {
    this.parse(def);
  }else if(def
    && typeof def === 'object'
    && typeof def.txt === 'string'
    && typeof def.md === 'string') {
    this.md = def.md;
    this.txt = def.txt;
  }else{
    throw new Error('invalid value for description');
  }
}
function Description ( def ) { if ( typeof def === 'string' ) { this . parse ( def ) ; } else if ( def && typeof def === 'object' && typeof def . txt === 'string' && typeof def . md === 'string' ) { this . md = def . md ; this . txt = def . txt ; } else { throw new Error ( 'invalid value for description' ) ; } }
Encapsulates a string represented as markdown and plain text.
Encapsulates a string represented as markdown and plain text .