/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/scene/container/utils/definedProps.ts
22 строки
569 B
Zyie
chore: documentation overhaul with typedoc (#11423)
19 май 2025, 11:44
Не верифицирован
19 май 2025, 11:44
34926f0
Код
Авторство
О чём код?
/** * Returns a new object with all properties from the input object that have defined values. * @template T - The type of the input object. * @param {T} obj - The input object. * @returns {T} - A new object with only the defined properties from the input object. * @category utils * @ignore */ export function definedProps<T extends Record<string, any>>(obj: T): T { const result: Partial<T> = {}; for (const key in obj) { if (obj[key] !== undefined) { result[key] = obj[key]; } } return result as T; }