jhnns / toSrc

Turns every JavaScript object or primitive into valid source code that can be evaled again.
MIT License
19 stars 3 forks source link

space parameter #4

Open piuccio opened 10 years ago

piuccio commented 10 years ago

Hello, nice project.

It would be even better if it was possible to specify a space parameter as in JSON.stringify. See here

For pretty printing it'll be good to have new lines after properties definitions and configure the indentation character.

jhnns commented 10 years ago

Hi,

thank you. Actually I don't use this module anymore because JSON.stringify accomplishes almost the same. But you can send me a pull-request, the source code is pretty straight-forward. :smile: