benjamine / jsondiffpatch

Diff & patch JavaScript objects
MIT License
4.78k stars 466 forks source link

README - show .create with default options - jsondiffpatch.create({}) #303

Closed floer32 closed 1 year ago

floer32 commented 3 years ago

If you do jsondiffpatch.create() (with no options argument), you get a confusing error: TypeError: Cannot read property 'processor' of undefined. This doesn't indicate the problem that create expects an empty options object, {}. Instead of adding handling or an error, for that case, I think the README is a fine solution.

README should mention this. jsondiffpatch does have sane defaults already, except for this one pesky case.

Resolves #266

Methuselah96 commented 1 year ago

I'm not able to reproduce this issue. What version of jsondiffpatch are you using and what environment are you using it in? Sorry for the delayed response.

Methuselah96 commented 1 year ago

Closing this for now, feel free to follow-up if you still think this is worth re-opening.