package.obj.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ol Show documentation
Show all versions of ol Show documentation
OpenLayers mapping library
The newest version!
/**
* @module ol/obj
*/
/**
* Removes all properties from an object.
* @param {Object} object The object to clear.
*/
export function clear(object) {
for (const property in object) {
delete object[property];
}
}
/**
* Determine if an object has any properties.
* @param {Object} object The object to check.
* @return {boolean} The object is empty.
*/
export function isEmpty(object) {
let property;
for (property in object) {
return false;
}
return !property;
}