Phrogz / NeatJSON

Pretty-print your JSON in Ruby, JS, or Lua with more power than JSON.stringify or JSON.pretty_generate
http://phrogz.net/JS/NeatJSON
MIT License
108 stars 19 forks source link

trimTrailingZeros breaks indentation #32

Closed Phrogz closed 2 years ago

Phrogz commented 2 years ago
o = [1,2]
neatJSON(o,{ wrap:true, decimals:3 })
// [
//   1,
//   2
// ]

neatJSON(o,{ wrap:true, decimals:3, trimTrailingZeros:true });
// [
// 1,
// 2
// ]

Also affects short formatting.