MCPcopy
hub / github.com/darkreader/darkreader / collectState

Method collectState

src/utils/state-manager-impl.ts:132–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130 }
131
132 private collectState() {
133 const state = {} as T;
134 for (const key of Object.keys(this.defaults) as Array<keyof T>) {
135 state[key] = this.parent[key] || this.defaults[key];
136 }
137 return state;
138 }
139
140 private applyState(storage: T) {
141 Object.assign(this.parent, this.defaults, storage);

Callers 1

saveStateInternalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected