MCPcopy
hub / github.com/angular/angularfire / positionFor

Function positionFor

src/compat/database/list/changes.ts:19–27  ·  view source on GitHub ↗
(changes: SnapshotAction<T>[], key)

Source from the content-addressed store, hash-verified

17}
18
19function 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
29function positionAfter<T>(changes: SnapshotAction<T>[], prevKey?: string) {
30 if (isNil(prevKey)) {

Callers 2

positionAfterFunction · 0.85
buildViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected