{"size": 793, "ext": "js", "max_stars_repo_path": "jsdocFilters.js", "max_stars_repo_name": "ringo/ringojs.org-apidocs", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "jsdocFilters.js", "max_issues_repo_name": "ringo/ringojs.org-apidocs", "max_issues_repo_issues_event_min_datetime": "2015-09-24T13:22:22.000Z", "max_issues_repo_issues_event_max_datetime": "2015-09-24T13:22:22.000Z", "max_forks_repo_path": "jsdocFilters.js", "max_forks_repo_name": "ringo/ringojs.org-apidocs", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 26.4333333333, "max_line_length": 70, "alphanum_fraction": 0.605296343}
var log = require("ringo/logging").getLogger(module.id);

var {markSafe} = require('reinhardt/utils');
var markdown = require('ringo-commonmark');

exports.paramTypeList = function(params) {
   if (params && params.length > 0) {
      return params.map(function(param) {
         // A simple check to improve jsdoc
         if (!param.type) {
            log.warn("No parameter name for", param.toSource());
         }
         return param.name;
      }).join(", ");
   }

   return '';
};

exports.limit = function(value) {
   return value ? value.substr(0, 100) + '…' : '';
};

exports.markdown = function(value) {
   return value ? markSafe(markdown.process(value)) : '';
};

exports.newLineList = function(value) {
   return value && value.length ? markSafe(value.join('<br />')) : '';
};