ECMAScript 5 (ES5) brings with it some nice improvements. The only problem is that only newer browsers (Internet Explorer 9, Firefox 4, Chrome 5, Safari 5) support it, or at least its most interesting parts.
es5-shim provides a possible solution.
In version v4.5.9, it includes two files
es5-sham.jsis monkey-patch other ES5 methods as closely as possible. For these methods, as closely as possible to ES5 is not very close.
es5-shim.js to be able to work properly.
You can also find a list of other polyfills here
ECMAScript 5 Compatibility Table can be used to find out what browser you need the shim. When in doubt, just include it, as it auto-detects whether your browser is too old or not.
Example of applying ES compatability shims in a browser project