Created
July 8, 2014 01:56
-
-
Save jasonmit/c08bb9c55314488c2b02 to your computer and use it in GitHub Desktop.
auto-radix parseInt
This file contains hidden or 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
/** | |
* Tired of code reviewing for this.. | |
*/ | |
window.parseInt = (function(pI) { | |
return function() { | |
var args = Array.prototype.slice.call(arguments); | |
if(args.length === 1) { args.push(10); } | |
return pI.apply(this, args); | |
} | |
})(window.parseInt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment