* Returns the asset or undefined when not found. * @param {string} name the name of the asset * @returns {Readonly<Asset> | undefined} the asset or undefined when not found
(name)
| 5485 | * @returns {Readonly<Asset> | undefined} the asset or undefined when not found |
| 5486 | */ |
| 5487 | getAsset(name) { |
| 5488 | if (!Object.prototype.hasOwnProperty.call(this.assets, name)) return; |
| 5489 | return { |
| 5490 | name, |
| 5491 | source: this.assets[name], |
| 5492 | info: this.assetsInfo.get(name) || EMPTY_ASSET_INFO |
| 5493 | }; |
| 5494 | } |
| 5495 | |
| 5496 | clearAssets() { |
| 5497 | for (const chunk of this.chunks) { |
no test coverage detected