json-to-ts
json-to-ts copied to clipboard
fix for the error - Reduce of empty array with no initial value
Hi,
When a JSON has empty key string, this error occurs as the reduce
call in the pascelCase function of getNames module doesn't have a default value.
{
"a": {
"": {
"": ""
}
}
}
The above JSON will throw the error.
Fixes #18.
@MariusAlch could you please have a look and close this?
Fixed with recent commits