var oldL = window.L, L = {}; L.version = '0.6-dev'; // define Leaflet for Node module pattern loaders, including Browserify if (typeof module === 'object' && typeof module.exports === 'object') { module.exports = L; // define Leaflet as an AMD module } else if (typeof define === 'function' && define.amd) { define('leaflet', [], function () { return L; }); } // define Leaflet as a global L variable, saving the original L to restore later if needed L.noConflict = function () { window.L = oldL; return this; }; window.L = L;