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

Function sliceAndSplice

src/compat/firestore/collection/changes.ts:82–91  ·  view source on GitHub ↗

* Splice arguments on top of a sliced array, to break top-level === * this is useful for change-detection

(
  original: T[],
  start: number,
  deleteCount: number,
  ...args: T[]
)

Source from the content-addressed store, hash-verified

80 * this is useful for change-detection
81 */
82function sliceAndSplice<T>(
83 original: T[],
84 start: number,
85 deleteCount: number,
86 ...args: T[]
87): T[] {
88 const returnArray = original.slice();
89 returnArray.splice(start, deleteCount, ...args);
90 return returnArray;
91}
92
93/**
94 * Creates a new sorted array from a new change.

Callers 1

combineChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected