es5-shim, as you rightly said, adds some JavaScript functions, such as map, reduce, some and forEach on Array, if the JavaScript browser engine is not compatible with ES5. Underscore.js adds utility methods similar to the above (or more) in the namespace "_". Thus, in this case, the use of both in one application is redundant.
Thus, es5-shim adds a few more functions, such as Date.now, Date.toJSON, Function.bind, String.trim (and much more), some of which do not have direct equivalents in Underscore.js. For example, Underscore provides _.bind and _.bindAll, which is equivalent to Function.bind, but Underscore.js does not provide Date.now and Date.toJSON.
So, if you use these additional methods provided by es5-shim, you can stay in your application with both es5-shim and Underscore.js. But if you do not use these additional methods, then using es5-shim will simply be an extra increase in application size and loss of bandwidth.
source share