diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index 9d114a1a..14cc24da 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -242,31 +242,6 @@ Ox.indicesOf = function(collection, test) { return ret; }; -/*@ -Ox.isEmpty Tests if a value is an empty array, object or string - (value) -> True if the value is an empty array, object or string - value <*> Any value - > Ox.isEmpty([]) - true - > Ox.isEmpty({}) - true - > Ox.isEmpty('') - true - > Ox.isEmpty(function() {}) - false - > Ox.isEmpty(false) - false - > Ox.isEmpty(null) - false - > Ox.isEmpty(0) - false - > Ox.isEmpty() - false -@*/ -Ox.isEmpty = function(value) { - return Ox.len(value) === 0; -}; - /*@ Ox.len Returns the length of an array, nodelist, object, storage or string Not to be confused with `Ox.length`, which is the `length` property of the diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index 519c6b8d..38d47fcd 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -74,7 +74,32 @@ Ox.isElement = function(value) { }; /*@ -Ox.isEqual Returns true if two values are equal +Ox.isEmpty Tests if a value is an empty array, object or string + (value) -> True if the value is an empty array, object or string + value <*> Any value + > Ox.isEmpty([]) + true + > Ox.isEmpty({}) + true + > Ox.isEmpty('') + true + > Ox.isEmpty(function() {}) + false + > Ox.isEmpty(false) + false + > Ox.isEmpty(null) + false + > Ox.isEmpty(0) + false + > Ox.isEmpty() + false +@*/ +Ox.isEmpty = function(value) { + return Ox.len(value) === 0; +}; + +/*@ +Ox.isEqual Tests if two values are equal