Lucee 5 extensionList() method #hacktoberfest
michaelborn opened this issue · comments
We're missing documentation for this little-known but extremely handy Lucee-specific method: extensionList()
.
- This method takes no arguments
- This method returns a
query
object
Here's a quick example of using this method to check the version of an installed extension:
var extension = extensionList().filter( ( extension ) => extension.name == "Hibernate ORM Engine" );
if ( !extension.recordCount ){
throw( "Hibernate extension is not installed; please install it now" );
} else {
var installedExtensionVersion = extension.version;
writeOutput( "You have the Hibernate extension version #installedExtensionVersion# installed. " );
}
Nice! thanks for posting details and an example @michaelborn
For anyone looking to add this, you'll need to add a new json file to the data/en
directory to document the function.
It's always fun to go to fix an issue and find out you've already fixed it. :-)
This can probably be closed.
thx for letting me know 🥇