Starcounter-Jack / JSON-Patch

Lean and mean Javascript implementation of the JSON-Patch standard (RFC 6902). Update JSON documents using delta patches.
MIT License
1.78k stars 215 forks source link

chore(applyPatch): correct comment #322

Open code-forger opened 5 months ago

code-forger commented 5 months ago

Sorry for the super tiny PR.

However in this comment, its noted that passing down the input param mutateDocument is unnecessary.

This is because in the case mutateDocument was **true** passing down true is effectively a no-op.

and in the case mutateDocument was **false** a deep clone has already taken place, so further deep clones are redundant and affect performance.

The comment had the above switched.