(simulation)
| 395 | } |
| 396 | |
| 397 | function 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 | |
| 408 | function map(nestedCmd, tagger, ...args) { |
| 409 | if (process.env.NODE_ENV !== 'production') { |