Skip to content

Instantly share code, notes, and snippets.

@ramonornela
Created September 23, 2016 21:41
Show Gist options
  • Save ramonornela/c2b4531589ee791f956461351732f51b to your computer and use it in GitHub Desktop.
Save ramonornela/c2b4531589ee791f956461351732f51b to your computer and use it in GitHub Desktop.
module.exports = function removePrivateApi() {
return {
name: 'remove-private-api',
description: 'Prevent the private apis from being rendered',
$runBefore: ['rendering-docs'],
$process: function(docs) {
console.log('Test: run hide-private');
var publicDocs = [];
docs.forEach(function(doc){
if(!doc.private){
publicDocs.push(doc);
return doc
}
})
docs = publicDocs;
return docs;
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment