MCPcopy Create free account
hub / github.com/winfunc/opcode / deleteAllData

Method deleteAllData

src/lib/analytics/consent.ts:79–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 }
78
79 async deleteAllData(): Promise<void> {
80 // Clear local storage
81 localStorage.removeItem(ANALYTICS_STORAGE_KEY);
82
83 // Reset settings with new anonymous ID
84 this.settings = {
85 enabled: true,
86 hasConsented: true,
87 userId: this.generateAnonymousId(),
88 sessionId: this.generateSessionId(),
89 };
90
91 await this.saveSettings();
92 }
93
94 getSettings(): AnalyticsSettings | null {
95 return this.settings;

Callers

nothing calls this directly

Calls 3

generateAnonymousIdMethod · 0.95
generateSessionIdMethod · 0.95
saveSettingsMethod · 0.95

Tested by

no test coverage detected