(arg0 = 1, arg1 = {})
| 202 | // increment(delta, payload) |
| 203 | // increment(payload) |
| 204 | increment(arg0 = 1, arg1 = {}){ |
| 205 | // increment([payload]) => step=1 |
| 206 | // handle the use case when `step` is omitted but payload is passed |
| 207 | if (typeof arg0 === 'object') { |
| 208 | this.update(this.value + 1, arg0); |
| 209 | |
| 210 | // increment([step=1], [payload={}]) |
| 211 | }else{ |
| 212 | this.update(this.value + arg0, arg1); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | // get the total (limit) value |
| 217 | getTotal(){ |
no test coverage detected