diff options
author | Thom Williams <thom.williams@pnnl.gov> | 2016-08-19 13:46:37 -0700 |
---|---|---|
committer | Thom Williams <thom.williams@pnnl.gov> | 2016-08-19 13:46:37 -0700 |
commit | 513ec85819f198d7fea96c1ea8c58d38f962056e (patch) | |
tree | dd4a8ed3fea1d4cd97b5becc515ba2d0ba4d2d1b | |
parent | 0a05cb38232e77a3d26c94b3d7d0ec0209240ffe (diff) | |
download | yamljs-513ec85819f198d7fea96c1ea8c58d38f962056e.tar.gz |
Update compiled libs
-rw-r--r-- | lib/Utils.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Utils.js b/lib/Utils.js index b5b96d6..8e6449f 100644 --- a/lib/Utils.js +++ b/lib/Utils.js @@ -69,8 +69,12 @@ Utils = (function() { }; Utils.isEmpty = function(value) { + return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value); + }; + + Utils.isEmptyObject = function(value) { var k; - return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || (value instanceof Object && ((function() { + return value instanceof Object && ((function() { var results; results = []; for (k in value) { @@ -78,7 +82,7 @@ Utils = (function() { results.push(k); } return results; - })()).length === 0); + })()).length === 0; }; Utils.subStrCount = function(string, subString, start, length) { |