You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: handle stream and file inputs
* chore: update jsdoc
* feat: v3.0.0
BREAKING CHANGE: streamListDiff is now imported from @donedeal0/superdiff/client or @donedeal/superdiff/server depending on your environment
Copy file name to clipboardExpand all lines: README.md
+64-7Lines changed: 64 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This library compares two arrays or objects and returns a full diff of their dif
18
18
19
19
Most existing solutions return a confusing diff format that often requires extra parsing. They are also limited to object comparison.
20
20
21
-
**Superdiff** provides a complete and readable diff for both arrays **and** objects. Plus, it's battle-tested, has zero dependencies, and is super fast.
21
+
**Superdiff** provides a complete and readable diff for both arrays **and** objects. Plus, it supports stream and file inputs for handling large datasets efficiently, is battle-tested, has zero dependencies, and is super fast.
Streams the diff of two object lists, ideal for large lists and maximum performance.
@@ -315,14 +318,33 @@ Streams the diff of two object lists, ideal for large lists and maximum performa
315
318
316
319
**Input**
317
320
321
+
#### Server
322
+
323
+
> In a server environment, `Readable` refers to Node.js streams, and `FilePath` refers to the path of a file (e.g., `./list.json`). Examples are provided in the #usage section below.
showOnly?: ("added"|"deleted"|"moved"|"updated"|"equal")[], // [] by default
331
+
chunksSize?:number, // 0 by default
332
+
considerMoveAsUpdate?:boolean; // false by default
333
+
}
334
+
```
335
+
336
+
#### Browser
337
+
338
+
> In a browser environment, `ReadableStream` refers to the browser's streaming API, and `File` refers to an uploaded or local file. Examples are provided in the #usage section below.
0 commit comments