From 46f3c60bf41df3a3682889b9dd294b06d7b8bef0 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Tue, 11 Apr 2023 22:19:20 +0200 Subject: [PATCH] Added new Bundle.prototype.files getter --- src/Bundle.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Bundle.ts b/src/Bundle.ts index 812c415..2ae9da1 100644 --- a/src/Bundle.ts +++ b/src/Bundle.ts @@ -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.