Skip to content

Instantly share code, notes, and snippets.

@arapehl
Forked from nathansmith/parseint.js
Created June 15, 2011 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arapehl/1027403 to your computer and use it in GitHub Desktop.
Save arapehl/1027403 to your computer and use it in GitHub Desktop.
var APP = (function(window) {
function parseInt(str, radix) {
radix = radix || 10;
return window.parseInt(str, radix);
}
return {
// Sub-objects and methods that
// use the modified parseInt...
//
// parseInt('090');
//
// instead of:
//
// parseInt('090', 10);
//
// Because, srsly, who ever means
// anything *but* base-10 parse?
};
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment