MCPcopy
hub / github.com/redux-loop/redux-loop / simulateMap

Function simulateMap

src/cmd.js:397–406  ·  view source on GitHub ↗
(simulation)

Source from the content-addressed store, hash-verified

395}
396
397function simulateMap(simulation) {
398 let result = this.nestedCmd.simulate(simulation);
399 if (Array.isArray(result)) {
400 return result.map((action) => this.tagger(...this.args, action));
401 } else if (result) {
402 return this.tagger(...this.args, result);
403 } else {
404 return null;
405 }
406}
407
408function map(nestedCmd, tagger, ...args) {
409 if (process.env.NODE_ENV !== 'production') {

Callers

nothing calls this directly

Calls 1

simulateMethod · 0.65

Tested by

no test coverage detected