UNPKG

esdoc-unexported-identifier-plugin

Version:

A unexported identifier plugin for ESDoc

17 lines (13 loc) 354 B
class Plugin { onHandleDocs(ev) { const option = ev.data.option || {}; if (!('enable' in option)) option.enable = false; const ignore = !option.enable; for (const doc of ev.data.docs) { if (doc.export === false && ignore && !('ignore' in doc)) { doc.ignore = ignore; } } } } module.exports = new Plugin();