| 109 | }; |
| 110 | |
| 111 | const filter = key => { |
| 112 | const match = pattern => (typeof pattern === 'string' ? key === pattern : pattern.test(key)); |
| 113 | |
| 114 | if (include) return include.some(match); |
| 115 | if (exclude) return !exclude.some(match); |
| 116 | return true; |
| 117 | }; |
| 118 | |
| 119 | for (const [object, key] of getAllProperties(self.constructor.prototype)) { |
| 120 | if (key === 'constructor' || !filter(key)) continue; |