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

This commit is contained in:
Tim Schaub
2016-02-03 22:20:03 -07:00
parent 417dbf36c8
commit e2fe897811
6 changed files with 33 additions and 10 deletions
+15
View File
@@ -41,6 +41,21 @@ ol.object.clear = function(object) {
};
/**
* Get an array of property values from an object.
* @param {Object<K,V>} object The object from which to get the values.
* @return {!Array<V>} The property values.
* @template K,V
*/
ol.object.getValues = function(object) {
var values = [];
for (var property in object) {
values.push(object[property]);
}
return values;
};
/**
* Determine if an object has any properties.
* @param {Object} object The object to check.