Replace goog.object.isEmpty() with ol.object.isEmpty()

This commit is contained in:
Tim Schaub
2016-02-03 21:17:32 -07:00
parent 0dce343d4f
commit 8aecb3270c
17 changed files with 71 additions and 47 deletions
+14
View File
@@ -37,6 +37,20 @@ ol.object.assign = (typeof Object.assign === 'function') ? Object.assign : funct
};
/**
* Determine if an object has any properties.
* @param {Object} object The object to check.
* @return {boolean} The object is empty.
*/
ol.object.isEmpty = function(object) {
var property;
for (property in object) {
return false;
}
return !property;
};
/**
* @enum {string}
*/