MCPcopy Index your code
hub / github.com/angular/angularfire / positionAfter

Function positionAfter

src/compat/database/list/changes.ts:29–40  ·  view source on GitHub ↗
(changes: SnapshotAction<T>[], prevKey?: string)

Source from the content-addressed store, hash-verified

27}
28
29function positionAfter<T>(changes: SnapshotAction<T>[], prevKey?: string) {
30 if (isNil(prevKey)) {
31 return 0;
32 } else {
33 const i = positionFor(changes, prevKey);
34 if (i === -1) {
35 return changes.length;
36 } else {
37 return i + 1;
38 }
39 }
40}
41
42function buildView(current, action) {
43 const { payload, prevKey, key } = action;

Callers 1

buildViewFunction · 0.85

Calls 2

isNilFunction · 0.90
positionForFunction · 0.85

Tested by

no test coverage detected