1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 25 25 7 46 7 | 'use strict'; var walk = require('../walk'); /** * Formats documentation as a JSON string. * * @param {Array<Object>} comments parsed comments * @param {Object} opts Options that can customize the output * @param {Function} callback called with null, string * @name json * @return {undefined} calls callback */ module.exports = function (comments, opts, callback) { walk(comments, function (comment) { delete comment.errors; }); return callback(null, JSON.stringify(comments, null, 2)); }; |