mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
16 lines
231 B
TypeScript
16 lines
231 B
TypeScript
function isEmpty<T extends object>(obj: T | undefined) {
|
|
if (!obj) {
|
|
return false;
|
|
}
|
|
|
|
for (const prop in obj) {
|
|
if (Object.hasOwn(obj, prop)) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
export default isEmpty;
|