Created
September 16, 2015 19:00
-
-
Save mattlundstrom/9047b969679d5ec8e5de to your computer and use it in GitHub Desktop.
Use Math without "Math"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.getOwnPropertyNames(Math).map(function(p) { | |
window[p] = Math[p]; | |
}); | |
// So instead of Math.random(), just use random(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment