From e20da7380b2df1ee8ade997c609cb2ca4c92c786 Mon Sep 17 00:00:00 2001 From: Fonoster Team Date: Sat, 12 Jan 2019 21:33:33 -0500 Subject: [PATCH] Removed comments --- mod/utils/obj_util.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/mod/utils/obj_util.js b/mod/utils/obj_util.js index 73e57dd93..df549ad07 100644 --- a/mod/utils/obj_util.js +++ b/mod/utils/obj_util.js @@ -6,26 +6,12 @@ var hasOwnProperty = Object.prototype.hasOwnProperty export default function isEmpty(obj) { - - // null and undefined are "empty" if (obj == null) return true - - // Assume if it has a length property with a non-zero value - // that that property is correct. if (obj.length > 0) return false if (obj.length === 0) return true - - // If it isn't an object at this point - // it is empty, but it can't be anything *but* empty - // Is it empty? Depends on your application. if (typeof obj !== "object") return true - - // Otherwise, does it have any properties of its own? - // Note that this doesn't handle - // toString and valueOf enumeration bugs in IE < 9 for (var key in obj) { if (hasOwnProperty.call(obj, key)) return false } - return true -} \ No newline at end of file +}