Skip to content

Instantly share code, notes, and snippets.

@JoeRobich
Created November 12, 2013 19:28

Revisions

  1. JoeRobich created this gist Nov 12, 2013.
    14 changes: 14 additions & 0 deletions isNullOrEmpty.as
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    public static function isNullOrEmpty(object:Object):Boolean
    {
    if (!object)
    return true;

    if (object is Array ||
    object is IList)
    return !object.length;

    for (var key:String in object)
    return false;

    return true;
    }