Skip to content

Conversation

@tony
Copy link
Contributor

@tony tony commented Sep 11, 2012

Hi, if it was a desire to keep this app ready for lint checks development I set up 2 options.

expr: true is for things such as return_exists || (return_exists === false);.

eqnull:true allows for us to use (var == null) which checks for undefined and null via type coercion (http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/). Had to look that up.

I think we have a valuable module and should keep thing in ship shape.

@tony
Copy link
Contributor Author

tony commented Sep 18, 2012

@powmedia : Can you take a look?

@powmedia powmedia merged commit e7ca65d into powmedia:master Oct 12, 2012
@powmedia
Copy link
Owner

Merged, thanks @tony

@cluebcke
Copy link

I realize this issue is way old, but I'm confused. return_exists || (return_exists = false) does something--if return_exists isn't truthy, it makes it false. Unless I'm missing something (possible), return_exists || (return_exists === false) does nothing at all. If return_exists is truthy, its value is returned. If it's falsey but not false, then false is returned. And if it's actually false, then true is returned. But the result of this expression is never assigned. Nothing actually happens.

Furthermore, from what I can see, truthey/falsey values (including undefined) should work just fine in this function.

What am I missing?

EDIT: Actually it doesn't look like this parameter is ever passed in by callers.

@tony
Copy link
Contributor Author

tony commented Mar 27, 2014

@cluebcke : Thanks for catching that! 67ebe90#diff-04a74a537643b8a201a5840d2bd116d1R52 is wrong. Want to do PR for this?

@cluebcke
Copy link

Sure, happy to.

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

Successfully merging this pull request may close these issues.

4 participants