LoudBit / is-too

Javascript type checking tool.
1 stars 0 forks source link

add `is.true` and `is.false` #13

Closed mrDarcyMurphy closed 9 years ago

mrDarcyMurphy commented 9 years ago

Just want to expand the Boolean checks a little.

is.true(true) // true
is.false(true) // false
is.true(1) // false

What about Boolean Objects that are either true or false? I'm considering those an edge case at the moment, but there might be value. At the very least I think being able to detect a boolean object would be appropriate, but I am doubtful of its utility.

var f = new Boolean(false)
is.true(f) // false
is.false(f) // true
is.booleanObject(f) // true