remove Ox.isFalsy

This commit is contained in:
rolux 2012-05-19 10:36:34 +04:00
parent d4954db30d
commit 373549a25a

View file

@ -142,36 +142,6 @@ Ox.isEqual = function(a, b) {
return isEqual;
};
/*@
Ox.isFalsy <f> Returns true for undefined, null, false, 0, '', [], {}
(value) -> <b> True if the value is falsy
value <*> Any value
> Ox.isFalsy(void 0)
true
> Ox.isFalsy(null)
true
> Ox.isFalsy(false)
true
> Ox.isFalsy(0)
true
> Ox.isFalsy('')
true
> Ox.isFalsy([])
true
> Ox.isFalsy({})
true
> Ox.isFalsy(NaN)
false
> Ox.isFalsy(function() {})
false
> Ox.isFalsy(/ /)
false
@*/
Ox.isFalsy = function(val) {
return (!val && !Ox.isNaN(val))
|| (Ox.isEmpty(val) && !Ox.isFunction(val));
};
/*@
Ox.isFunction <f> Tests if a value is a function
(value) -> <b> True if the value is a function