-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2-module.ts
More file actions
39 lines (33 loc) · 923 Bytes
/
2-module.ts
File metadata and controls
39 lines (33 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Diff } from '../index'
import {
v1,
v2,
v3,
v4,
v5,
v6,
} from './objects'
export const moduleTest = async () => {
const diffs = Diff.Operational.diffs([
v1,
v2,
v3,
v4,
v5,
v6,
])
console.log('\ndiffs ->', diffs)
const changelogs = Diff.Operational.changelogs(diffs[0], v1)
console.log('\nchangelogs ->', changelogs)
const changelogsFormatted = Diff.Operational.changelogsFormatted({
diff: diffs[0],
original: v1,
format: 'html'
})
console.log('\nchangelogsFormatted ->\n', changelogsFormatted)
const patched = Diff.Operational.patch(v1, diffs[0])
console.log('\nsingle patched', patched)
const multiplePatched = Diff.Operational.patches(v1, diffs)
console.log('\nmultiple patched', multiplePatched)
// console.log('\ndiffs', JSON.stringify(diffs, null, 4))
}