MCPcopy Create free account
hub / github.com/Khan/perseus / flattenChunks

Function flattenChunks

packages/perseus-editor/src/diffs/shared/string-array-diff.ts:78–80  ·  view source on GitHub ↗
(chunks: ImageEntry[])

Source from the content-addressed store, hash-verified

76// { "value":3, "status":"unchanged"},
77// { "value":4, "status":"added"}]
78function flattenChunks(chunks: ImageEntry[]): ImageDiff[] {
79 return mapcat(chunks, splitUpChunk);
80}
81
82// Take two arrays and create a diff for them. The result is two arrays of
83// objects, one for the things that should be included in a 'before', and one

Callers 1

stringArrayDiffFunction · 0.85

Calls 1

mapcatFunction · 0.85

Tested by

no test coverage detected