Skip to content

Instantly share code, notes, and snippets.

@vanm
Created November 10, 2011 19:52
Show Gist options
  • Select an option

  • Save vanm/1355968 to your computer and use it in GitHub Desktop.

Select an option

Save vanm/1355968 to your computer and use it in GitHub Desktop.
API Access Point
(function(){
// Private (not accessible in global scope)
function UtilityFunction(){}
function ThirdPartyAPI(){}
// Export a single global access point the ThirdPartyAPI
window.thirdPartyAPI = window.thirdPartyAPI || new ThirdPartyAPI();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment