MCPcopy
hub / github.com/nukeop/nuclear / withPersistence

Function withPersistence

packages/player/src/stores/queueStore.ts:99–106  ·  view source on GitHub ↗
(
  fn: (...args: T) => void,
)

Source from the content-addressed store, hash-verified

97};
98
99const withPersistence = <T extends unknown[]>(
100 fn: (...args: T) => void,
101): ((...args: T) => void) => {
102 return (...args: T) => {
103 fn(...args);
104 void saveToDisk();
105 };
106};
107
108export const useQueueStore = create<QueueStore>((set, get) => ({
109 items: [],

Callers 1

queueStore.tsFile · 0.70

Calls 2

fnFunction · 0.85
saveToDiskFunction · 0.70

Tested by

no test coverage detected