/
outbreak
/
kilocode
Обзор
Документация
Войти
/
outbreak
/
kilocode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/utils/object.ts
18 строк
447 B
Matt Rubens
Make the default architect prompt create a todo list (#5472)
08 июл 2025, 20:59
Не верифицирован
08 июл 2025, 20:59
0606c56
Код
Авторство
О чём код?
/** * Check if an object is empty (has no own enumerable properties) * @param obj The object to check * @returns true if the object is empty, false otherwise */ export function isEmpty(obj: unknown): boolean { if (!obj || typeof obj !== "object") { return true } // Check if it's an array if (Array.isArray(obj)) { return obj.length === 0 } // Check if it's an object with no own properties return Object.keys(obj).length === 0 }