diff --git a/src/utilities.js b/src/utilities.js new file mode 100644 index 0000000..550f6ff --- /dev/null +++ b/src/utilities.js @@ -0,0 +1,10 @@ +/** + * Returns true if object has no entries, otherwise false. + * @param {Object} objectToCheck The object to check. + * @returns true if object has no entries, otherwise false. + */ +function objectIsEmpty(objectToCheck) { + return Object.entries(objectToCheck).length === 0; +} + +export { objectIsEmpty }; \ No newline at end of file