UNPKG

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">

39 lines (36 loc) 720 B
'use strict'; "use strict"; function cleanHash(hash) { let clean = false; for (const i in hash) { if (hash[i] == void 0) { clean = true; break; } } if (!clean) return hash; const cleanHash2 = /* @__PURE__ */ Object.create(null); for (const i in hash) { const value = hash[i]; if (value) { cleanHash2[i] = value; } } return cleanHash2; } function cleanArray(arr) { let offset = 0; for (let i = 0; i < arr.length; i++) { if (arr[i] == void 0) { offset++; } else { arr[i - offset] = arr[i]; } } arr.length -= offset; return arr; } exports.cleanArray = cleanArray; exports.cleanHash = cleanHash; //# sourceMappingURL=clean.js.map