code: function() {
          if (
              Crafty.loggingEnabled &&
              (typeof window !== "undefined" ? window.console : console) &&
              console.log
          ) {
              console.log.apply(console, arguments);
          }
      }
docs: In some cases console.log doesn't exist, so provide a wrapper for it