(current: DocumentChange<T>[], changes: DocumentChange<T>[], events: DocumentChangeType[])
| 66 | * of changes. |
| 67 | */ |
| 68 | export function combineChanges<T>(current: DocumentChange<T>[], changes: DocumentChange<T>[], events: DocumentChangeType[]) { |
| 69 | changes.forEach(change => { |
| 70 | // skip unwanted change types |
| 71 | if (events.indexOf(change.type) > -1) { |
| 72 | current = combineChange(current, change); |
| 73 | } |
| 74 | }); |
| 75 | return current; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * Splice arguments on top of a sliced array, to break top-level === |
no test coverage detected