-
Notifications
You must be signed in to change notification settings - Fork 265
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
Rename long
and short
#53
Conversation
Cause it is reserved words in ES1-3. It is ok for ES2015, but it still breaks down Closure Compiler.
@@ -25,8 +25,8 @@ module.exports = function(val, options){ | |||
options = options || {}; | |||
if ('string' == typeof val) return parse(val); | |||
return options.long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use options['long'], since the reserved word problem can still affect object properties. Also, my syntax checker complained about these not being on the same line, so maybe
return options['long'] ? fmtLong(val) : fmtShort(val);
would be better.
Yeah, you are right. Fixed it. 😎 |
@gobwas Good catch! +1 |
@shuvalov-anton 😎 |
Thanks! ❤️ |
Could you publish a tag as quick as possible with this PR ? Thank you |
Cause it is reserved words in ES1-3. It is ok for ES2015, but it still breaks down Closure Compiler.