MCPcopy Index your code
hub / github.com/massCodeIO/massCode / replaceStoreIfChanged

Function replaceStoreIfChanged

src/main/store/sanitize.ts:85–92  ·  view source on GitHub ↗
(
  store: Pick<ElectronStore<T>, 'store'>,
  value: T,
)

Source from the content-addressed store, hash-verified

83}
84
85export function replaceStoreIfChanged<T extends Record<string, any>>(
86 store: Pick<ElectronStore<T>, 'store'>,
87 value: T,
88): void {
89 if (JSON.stringify(store.store) !== JSON.stringify(value)) {
90 store.store = value
91 }
92}

Callers 2

preferences.tsFile · 0.90
app.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected