UNPKG

@razz21/vue-scan

Version:

Track and visualize Vue 3 component renders

26 lines (25 loc) 623 B
class a { constructor(e, t, s) { this.options = e, this.store = t, this.canvas = s; } async track(e) { const t = await this.store.trackRender(e); t && await this.canvas.highlight(t); } delete(e) { this.store.deleteElement(e), this.canvas.deleteElement(e); } clear() { this.canvas.clear(), this.store.clear(); } garbageCollectElements() { this.store.getStore().forEach((e) => { const t = e.instance.deref(), s = e.el?.deref(); t && s?.isConnected || this.delete(e.uid); }); } } export { a as VueScanInstrumentation }; //# sourceMappingURL=instrumentation.js.map