Added new Bundle.prototype.files getter

This commit is contained in:
Alexander Cerutti
2023-04-11 22:19:20 +02:00
parent df9d3e808c
commit 46f3c60bf4

View File

@@ -87,6 +87,21 @@ export default class Bundle {
return Object.isFrozen(this[filesSymbol]);
}
/**
* Returns a copy of the current list of buffers
* that have been added to the class.
*
* It does not include translation files, manifest
* and signature.
*
* Final files list might differ due to export
* conditions.
*/
public get files() {
return Object.keys(this[filesSymbol]);
}
/**
* Allows files to be added to the bundle.
* If the bundle is closed, it will throw an error.