Skip to content
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

Converting %d to NaN #13

Closed
Proful opened this issue Jun 5, 2011 · 2 comments
Closed

Converting %d to NaN #13

Proful opened this issue Jun 5, 2011 · 2 comments

Comments

@Proful
Copy link

Proful commented Jun 5, 2011

I am trying to convert some Node.js side script to coffeescript.
console.log("Listening on port %d",3000);

converting to
console.log "Listening on port NaN", 3000

Is it expected behavior?

@rstacruz
Copy link
Member

rstacruz commented Jun 6, 2011

Not at all... thanks for the report.

@rstacruz
Copy link
Member

rstacruz commented Jun 6, 2011

By the way this only affects the Node version (tried with 0.4.7), running it in a browser (http://ricostacruz.com/js2coffee/) seems to work properly.

Looks like an inconsistency with JSON.stringify behavior. This is because in js2coffee/node, the output is being thrown to STDOUT using console.log(string).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants