UNPKG

374 BJavaScriptView Raw
1class Plugin {
2 onHandleDocs(ev) {
3 this._option = ev.data.option || {};
4 if (!('enable' in this._option)) this._option.enable = true;
5
6 const ignore = !this._option.enable;
7
8 for (const doc of ev.data.docs) {
9 if (doc.undocument === true && ignore && !('ignore' in doc)) {
10 doc.ignore = ignore;
11 }
12 }
13 }
14}
15
16module.exports = new Plugin();