(object = {}, key, amount = 1)
| 12 | const jobPromiseQueue = new KeyPromiseQueue(); |
| 13 | |
| 14 | const incrementOp = function (object = {}, key, amount = 1) { |
| 15 | if (!object[key]) { |
| 16 | object[key] = { __op: 'Increment', amount: amount }; |
| 17 | } else { |
| 18 | object[key].amount += amount; |
| 19 | } |
| 20 | return object[key]; |
| 21 | }; |
| 22 | |
| 23 | export function flatten(array) { |
| 24 | var flattened = []; |