JSON-Patch icon indicating copy to clipboard operation
JSON-Patch copied to clipboard

Inaccurate documentation

Open Piliponful opened this issue 3 years ago • 1 comments

jsonpatch.compare(document1: any, document2: any, invertible = false): Operation[]

compare doesn't accept any type. It accepts only objects from what I can see. Definitely doesn't accept null or undefined

Piliponful avatar Feb 10 '22 14:02 Piliponful

Correct you are. It should accept null as it is a valid result from parsing JSON or as JSON stringify input.

Starcounter-Jack avatar Mar 24 '22 17:03 Starcounter-Jack