index.js
function applyJsDocTags(comment, removeTagLine) {
  removeTagLine = (undefined !== removeTagLine) ? removeTagLine : true;
  var lines = [];
  comment.tags = [];

  for (var i = 0; i < comment.lines.length; i++) {
    var line = comment.lines[i];

    if ('@' === line.charAt(0)) {
      var spacePos = line.indexOf(' ');
      if (-1 === spacePos) {
        spacePos = line.length;
      }
      var tag = line.substr(1, spacePos).trim();
      var value = line.substr(spacePos).trim();
      comment.tags.push({ name: tag, value: value || true });
    } else {
      lines.push(line);
    }
  }

  if (removeTagLine) {
    comment.lines = lines;
  }
}
function applyJsDocTags(comment, removeTagLine) {
  removeTagLine = (undefined !== removeTagLine) ? removeTagLine : true;
  var lines = [];
  comment.tags = [];

  for (var i = 0; i < comment.lines.length; i++) {
    var line = comment.lines[i];

    if ('@' === line.charAt(0)) {
      var spacePos = line.indexOf(' ');
      if (-1 === spacePos) {
        spacePos = line.length;
      }
      var tag = line.substr(1, spacePos).trim();
      var value = line.substr(spacePos).trim();
      comment.tags.push({ name: tag, value: value || true });
    } else {
      lines.push(line);
    }
  }

  if (removeTagLine) {
    comment.lines = lines;
  }
}
function applyJsDocTags ( comment , removeTagLine ) { removeTagLine = ( undefined !== removeTagLine ) ? removeTagLine : true ; var lines = [ ] ; comment . tags = [ ] ; for ( var i = 0 ; i < comment . lines . length ; i ++ ) { var line = comment . lines [ i ] ; if ( '@' === line . charAt ( 0 ) ) { var spacePos = line . indexOf ( ' ' ) ; if ( - 1 === spacePos ) { spacePos = line . length ; } var tag = line . substr ( 1 , spacePos ) . trim ( ) ; var value = line . substr ( spacePos ) . trim ( ) ; comment . tags . push ( { name : tag , value : value || true } ) ; } else { lines . push ( line ) ; } } if ( removeTagLine ) { comment . lines = lines ; } }
Find tags in comment, remove this lines and apply as property
@param {Object} comment
@param {boolean} [removeTagLine=true]
Find tags in comment remove this lines and apply as property