jQuery does exactly that, with polyfills for browsers without the native implementation. jQuery 2.x does away with many of the polyfills since older IE versions aren't supported.
If you want an even smaller jQuery, you can build your own[0] without the modules you don't need.