import encodeSummaryArticle from "../json/encodeSummaryArticle" ; param { Output } output param { Config } config return { Object } function encodeSummary ( output , summary ) { const result = { param { Function } iter walk : function ( iter ) { summary . getArticle ( ( article ) => { const jsonArticle = encodeSummaryArticle ( article , false ) ; return iter ( jsonArticle ) ; } ) ; } , param { string } level return { Object } getArticleByLevel : function ( level ) { const article = summary . getByLevel ( level ) ; return article ? encodeSummaryArticle ( article ) : undefined ; } , param { string } level return { Object } getArticleByPath : function ( level ) { const article = summary . getByPath ( level ) ; return article ? encodeSummaryArticle ( article ) : undefined ; } , } ; return result ; } export default encodeSummary ;