sterpe / coffee-fmt

gofmt for coffee
MIT License
9 stars 4 forks source link

TypeError: Cannot read property 'length' of undefined #1

Closed NotBobTheBuilder closed 9 years ago

NotBobTheBuilder commented 9 years ago

Looks like the error occurs here when accessing the tab property. I was using the options provided in the README, through the JS API.

NotBobTheBuilder commented 9 years ago

Seems to work when I use

tab: ' ',
newLine: '\n'

as the options. Perhaps there should be some defaults? Or at least, the README should include those as examples.

sterpe commented 9 years ago

Yes, you are right. For some reason I typed out the cmdline arg format into the js api example.

tab should be the string to use as a tab might be "\t" or " " (2spaces) or " " (4spaces) or whatever.

NotBobTheBuilder commented 9 years ago

Cool :) I Filed a PR :)