Skip to content

Instantly share code, notes, and snippets.

@jasonmit
Created July 8, 2014 01:56
Show Gist options
  • Save jasonmit/c08bb9c55314488c2b02 to your computer and use it in GitHub Desktop.
Save jasonmit/c08bb9c55314488c2b02 to your computer and use it in GitHub Desktop.
auto-radix parseInt
/**
* 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