In my old JavaScript libraries I often use the following pattern:
;(function (root, factory) { \'use strict\'; // AMD if (typeof define === \'functio