summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom Williams <thom.williams@pnnl.gov>2016-08-19 13:28:17 -0700
committerThom Williams <thom.williams@pnnl.gov>2016-08-19 13:28:17 -0700
commitaf54a68ffd91ff15e70166ebdd440c7f5ae9b24c (patch)
treed844d34ff92afc986b997092162e606df873620f
parentf40cecc8aa983a2f4d61406ca23a7e80020ac55e (diff)
downloadyamljs-af54a68ffd91ff15e70166ebdd440c7f5ae9b24c.tar.gz
Update compiled Util lib
-rw-r--r--lib/Utils.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Utils.js b/lib/Utils.js
index 1a360c2..b5b96d6 100644
--- a/lib/Utils.js
+++ b/lib/Utils.js
@@ -1,5 +1,6 @@
// Generated by CoffeeScript 1.10.0
-var Pattern, Utils;
+var Pattern, Utils,
+ hasProp = {}.hasOwnProperty;
Pattern = require('./Pattern');
@@ -68,7 +69,16 @@ Utils = (function() {
};
Utils.isEmpty = function(value) {
- return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0);
+ var k;
+ return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || (value instanceof Object && ((function() {
+ var results;
+ results = [];
+ for (k in value) {
+ if (!hasProp.call(value, k)) continue;
+ results.push(k);
+ }
+ return results;
+ })()).length === 0);
};
Utils.subStrCount = function(string, subString, start, length) {