Permalink
Browse files

Added elation.utils.isArray()

  • Loading branch information...
1 parent 93e64ab commit 10d163f09db5d8833e852d1025ce7ba1905d50f7 James Baicoianu committed Jan 19, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 components/utils/htdocs/scripts/elation.js
@@ -792,6 +792,11 @@ elation.extend("utils.isEmpty", function(obj) {
return true;
});
+elation.extend("utils.isArray", function(obj) {
+ var objclass = Object.prototype.toString.call(obj);
+ return objclass === '[object Array]' || objclass === '[object NodeList]';
+});
+//
// runs through direct children of obj and
// returns the first matching <tag> [className]
elation.extend("utils.getFirstChild", function(obj, tag, className) {

0 comments on commit 10d163f

Please sign in to comment.