Skip to content
Myr

refactor: simplify mapGetters.keys

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Alec Larson · committed by Alec Larson · parent 3163a7d · Browse files · 1 file+1 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−11 removed

  • other:+1 added−11 removed

1 file+1 added−11 removed

modified:src/proxy.js+1 added-11 removed
233 unmodified lines
234 }235236 return draft237 },238 keys(state) {239 return function*() {240 const iterator = source(state).keys()241 let result = iterator.next()242 while (!result.done) {243 const key = result.value244 yield key245 result = iterator.next()246 }247 }248 },238 keys: state => () => source(state).keys(),239 values: iterateMapValues,240 entries: iterateMapValues,241 [Symbol.iterator]: iterateMapValues242}
45 unmodified lines