 # Doesn't modify map.  If map is an array, just returns it
 # with no change even if it has undefined values.
 exports.map_without_undefined = map_without_undefined = (map) ->
+    if not map?
+        return
     if is_array(map)
         return map
-    if not map?
-        return
     new_map = {}
     for k, v of map
         if not v?



# convert object x to a JSON string, removing any keys that have "pass" in them and
# any values that are potentially big -- this is meant to only be used for loging.
exports.to_safe_str = (x) ->
    obj = {}
    for key, value of x


exports.is_different_array = (a, b) ->
    ad = a?; bd = b?
    if (not ad) and (not bd)
        return false
    if ad isnt bd
        return true
    if a.length != b.length
        return true
