(changes: SnapshotAction<T>[], key)
| 17 | } |
| 18 | |
| 19 | function positionFor<T>(changes: SnapshotAction<T>[], key) { |
| 20 | const len = changes.length; |
| 21 | for (let i = 0; i < len; i++) { |
| 22 | if (changes[i].payload.key === key) { |
| 23 | return i; |
| 24 | } |
| 25 | } |
| 26 | return -1; |
| 27 | } |
| 28 | |
| 29 | function positionAfter<T>(changes: SnapshotAction<T>[], prevKey?: string) { |
| 30 | if (isNil(prevKey)) { |
no outgoing calls
no test coverage detected