Closed jchou closed 9 years ago
:+1: I like this, although I think strict is better... something @noahsark769 was just strict about
I almost always tend to prefer strict comparison as well. Strings are an exception, though: the object "west" is not equal to the string primitive "west" used here. Not sure why anyone would pass in a string object rather than primitive in instantiation, but you never know ¯(ツ)/¯ just thought it might cause some confusion. Thoughts?
What do you mean the object "west"? The only time this constructor is used is passing in a String in PDFGenerator.js:63
Personally I like strict comparison also, but I can see the point that new String("hello") !== "hello"
would be confusing. By the object, you mean a new String("hello")
right? In that case, I can actually get behind this one.
Yeah, the value of the corresponding "West up" / "East up" radio is passed into the constructor so it works fine as it is used now, but from a modular perspective, I'd say that, in the current state of using certain strings to determine the behavior of the constructor, new String("west") and "west" should be considered the same. Yep, that's what I was referring to, Noah. Supes minor thing, I was just randomly perusing calchart-viewer ;P
Yea sure, I'm fine with this. Welcome to the code, Jack!
It's cool to get a new contributors on GitHub. Shipping!
Ternary ifs may be redundant when the expected return value is also a boolean. Not sure about benefits of strict string comparison here.