Get current library version to use with getLibraryPath



I am developping an h5p editor widget.

I need to manualy import some javascript during execution (I can't use preloadedJs). In order to do that, I need the path of my current library.

There is the h5p.getLibraryPath function, but it require the full machine name of my library, including the version number.

I was wondering if there was a way to access library version / full machine name to avoid hardcoding the version number in my javascript file.

Thanks !

An ugly way to do it would be to use H5PEditor.libraryCache[this.parent.currentLibrary].javascript

By searching my current widget name I can find the path but it's a very ugly way to do.