MCPcopy Index your code
hub / github.com/darkreader/darkreader / modifyInternalState

Function modifyInternalState

tests/unit/utils/state-manager.tests.ts:534–544  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

532
533 let onChangedListener: ((data: any) => void) | undefined;
534 const modifyInternalState = (data: any) => {
535 expect(onChangedListener).toBeTruthy();
536 const oldValue = storage[key];
537 storage[key] = data;
538 onChangedListener!({
539 [key]: {
540 oldValue,
541 newValue: data,
542 },
543 });
544 };
545
546 const parent: any = {
547 data: 'fromParent',

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected