AmpersandJS/ampersand-dom — pull request #3 by chesles (2014-07-06 03:15:31+00:00)
Title: make dom.text(el, 0) populate el with the string '0'

The [ampersand-dom-bindings docs][1] say that a binding where type=text will treat `undefined`, `null`, and `NaN` as `''` - which makes perfect sense. However, I think it makes sense to treat the numeric value `0` as the string `"0"` - otherwise, any numeric field on state or model objects that use a text binding will be blank if their value is 0.

This commit adds tests for how `dom.text` treats all falsy values and makes a change so that `0` is treated as a number and becomes `"0"`.

[1]: http://ampersandjs.com/docs#ampersand-dom-bindings-text