Skip to content

Conversation

@chenos
Copy link
Contributor

@chenos chenos commented Mar 20, 2017

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 98.874% when pulling d8119e6 on chenos:master into 2ae6874 on harttle:master.

src/syntax.js Outdated

function isFalsy(val) {
return !isTruthy(val);
return false === val || undefined === val;
Copy link
Owner

@harttle harttle Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my understanding, ruby's nil is null or undefined in javascript.

So

return false === val || undefined === val || null === val;

});

it('should support for reversed in the first position', function() {
it('should support for reversed in the middle position', function() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.001%) to 98.874% when pulling 7400e06 on chenos:master into 2ae6874 on harttle:master.

@harttle harttle merged commit 6677486 into harttle:master Mar 21, 2017
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.

3 participants