Closed mengfanliao closed 3 years ago
@josdejong
Thanks a lot @mengfanliao , good find and fix. I'll review your fix soon but I'm a bit short on time this week.
I've had another look at your PR @mengfanliao. It works correctly indeed 👍. I was thinking about whether it makes sense to call stringifyValue
to stringify the keys: this function is meant for values and contains checking types like string, array, object, etc. I think we can make the code a little bit simpler and more performant by calling JSON.stringify(key)
instead of stringifyValue(...)
. What do you think?
@josdejong i think you are right,i have modified the code and call JSON.stringify
rather than stringifyValue
。
Thanks for the update @mengfanliao , looks good 👍
Fix is published now in v1.0.5
. Thanks again @mengfanliao!
first, thank you to open source, and there is a bug, i found and want to fix it.
like code blow, i execute
stringify
api andJSON.stringify
, and the arguments is the same, but the result is not the same. the result of stringify lose four backslash。so, i modified the code in stringify.js and add unit test to prove it works.