We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfafa10 commit 2ac1627Copy full SHA for 2ac1627
src/diff/array.js
src/diff/array.ts
@@ -0,0 +1,25 @@
1
+import Diff, {DiffOptions} from './base';
2
+
3
+class ArrayDiff extends Diff<any, Array<any>> {
4
+ protected tokenize(value: Array<any>) {
5
+ return value.slice();
6
+ }
7
8
+ protected join(value: Array<any>) {
9
+ return value;
10
11
12
+ protected removeEmpty(value: Array<any>) {
13
14
15
+}
16
17
+export const arrayDiff = new ArrayDiff();
18
19
+export function diffArrays(
20
+ oldArr: Array<any>,
21
+ newArr: Array<any>,
22
+ options: DiffOptions<Array<any>>
23
+) {
24
+ return arrayDiff.diff(oldArr, newArr, options);
25
0 commit comments