Skip to content

Commit

Permalink
Added elation.utils.isArray()
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baicoianu committed Jan 19, 2012
1 parent 93e64ab commit 10d163f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/utils/htdocs/scripts/elation.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 10d163f

Please sign in to comment.