This method restores the L global variable to the original value it had before Leaflet inclusion, and returns the real Leaflet namespace so you can put it elsewhere, like this: // L points to some other library ... // you include Leaflet, it replaces the L variable to Leaflet namespace var Leaflet = (); // now L points to that other library again, and you can use etc. version A constant that represents the Leaflet version in use. // contains "" (or whatever version is currently in use) © 2017 Vladimir Agafonkin . Maps © OpenStreetMap contributors.
When the above is run, it will set to true when it is tuesday, and to false every other day of the week. One thing to notice is that the names of feature detect functions are always lowercased when added to the Modernizr object. That means that will not exist, but will. Since we only look at the returned value from any feature detection function, you do not need to actually use a function. For simple detections, just passing in a statement that will return a boolean value works just fine.