Getting app ID/name in frontend scripts

I see that most apps put their app ID/name hardcoded in a lot of places, e.g. when generating URLs such as const url = generateUrl('/apps/catgifs/config').

Is there a way to get the app’s ID/name in the frontend JS side of things, so one can put that instead of a hardcoded value in these places? On the server side Application::APP_ID is heavily used, I’m looking for something similar.