pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
1 lines • 1.01 kB
Source Map (JSON)
{"version":3,"file":"definedProps.mjs","sources":["../../../../src/scene/container/utils/definedProps.ts"],"sourcesContent":["/**\n * Returns a new object with all properties from the input object that have defined values.\n * @template T - The type of the input object.\n * @param {T} obj - The input object.\n * @returns {T} - A new object with only the defined properties from the input object.\n * @category utils\n * @ignore\n */\nexport function definedProps<T extends Record<string, any>>(obj: T): T\n{\n const result: Partial<T> = {};\n\n for (const key in obj)\n {\n if (obj[key] !== undefined)\n {\n result[key] = obj[key];\n }\n }\n\n return result as T;\n}\n"],"names":[],"mappings":";AAQO,SAAS,aAA4C,GAC5D,EAAA;AACI,EAAA,MAAM,SAAqB,EAAC,CAAA;AAE5B,EAAA,KAAA,MAAW,OAAO,GAClB,EAAA;AACI,IAAI,IAAA,GAAA,CAAI,GAAG,CAAA,KAAM,KACjB,CAAA,EAAA;AACI,MAAO,MAAA,CAAA,GAAG,CAAI,GAAA,GAAA,CAAI,GAAG,CAAA,CAAA;AAAA,KACzB;AAAA,GACJ;AAEA,EAAO,OAAA,MAAA,CAAA;AACX;;;;"}