Consider the following :
import { compare } from 'json-diff-ts'
console.log(compare(["foo"], ["bar"]))
The result is :
{
type: 'CONTAINER',
value: [ { type: 'UNCHANGED', value: 'foo' }, '$root': [ [Object] ] ]
}
(the actual change is hidden inside the $root key) Is this intended ?
It seems inconsistent with what happens for objects :
import { compare } from 'json-diff-ts'
console.log(compare({ "k": "foo" }, { "k": "bar" }))
{
type: 'CONTAINER',
value: { k: { type: 'UPDATE', value: 'bar', oldValue: 'foo' } }
}
Consider the following :
The result is :
(the actual change is hidden inside the $root key) Is this intended ?
It seems inconsistent with what happens for objects :