Closed joyrexus closed 10 years ago
This is fun! I would love to contribute also, but I sadly can't find the cycles. I would however be interested in hosting this when it's complete in the funjs account if you're interested.
@fogus cool, I'll let you know when we're done working through it. Thanks for the tweet.
Hi @joyrexus can you add issues to https://github.com/joyrexus/func-js-book that would make it easier to contribute to your changes :)
Btw I've started to add a couple of these methods to fluentnode (see https://github.com/o2platform/fluentnode/issues/29) including unit tests to confirm its behaviour:
require('../src/globals')
describe 'global',->
it 'existy',->
existy(null ).assert_False()
existy(undefined ).assert_False()
existy({}.notHere).assert_False()
existy((()->)() ).assert_False() # same as existy((function(){})())
existy(@ ).assert_True()
existy(0 ).assert_True()
existy(true ).assert_True()
existy(false ).assert_True()
it 'truthly',->
truthly(null ).assert_False()
truthly(false ).assert_False()
truthly(undefined).assert_False()
truthly(0 ).assert_True()
truthly(1 ).assert_True()
truthly('' ).assert_True()
truthly(' ' ).assert_True()
truthly(true ).assert_True()
FWIW, my fork contains CoffeeScript variants of the first three chapters. I'd welcome contributions from the later chapters if anyone else is working through through the text in this manner (i.e., converting to idiomatic CS).