Basically, in a third-party js file which I can edit but would prefer not to edit:
(function(){ const map = new map