-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array empty element converts to null #6
Comments
I would accept a pull request to fix this, but it requires us to manually do the stringifying of Arrays and Objects. That would let us properly handle |
Is it really needed? |
I'm confused. This was your issue. If you don't think the problem needs solving, why did you open the issue? |
Just to state that issues exists |
btw fix is quite easy if (Array.isArray(obj))
return '[' + obj.map(x => stringify(x)).join(',') + ']'; but it will sometimes add +1 to arr length based on trailing comma support of runtime |
That example is wrong in a more subtle way: [,,,,]
// => [empty x 4]
eval('[' + [,,,,].join(',') + ']')
// => [empty x 3] I don't know whether this is super important to fix or not. I suspect not as sparse arrays are a pretty rare occurrence, but it would be nice to support |
Yes, as mentioned before trailing comma consumes last delimetr |
The text was updated successfully, but these errors were encountered: