es-shims/es5-shim
View on GitHub ↗ ★ 7,070 JavaScript
ECMAScript 5 compatibility shims for legacy (and modern) JavaScript engines
14 mentions on Hacker News by 14 people: 1 story, 13 comments · first 2011-04-27 · latest 2017-08-12
20082026
-
It requires ES5 features like Object.freeze and Object.defineProperty to work correctly. https://github.com/es-shims/es5-shim#may-fail
comment by filipn · 2017-08-12 · in Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects -
A number of these things are available in IE9 and older using https://github.com/es-shims/es5-shim (including Object.create that the article was talking about)
comment by tuxracer · 2014-11-06 · in Stop Using Constructors in JS (2012) -
True. But anyone supporting IE < 9 I'd think would be using ES5 shim: https://github.com/es-shims/es5-shim But maybe not?
comment by jonpaul · 2014-08-08 · in ES6 Maps are now on by default in Chrome 38 -
…I prefer using native methods (i.e. `forEach`, `map`, etc..) and including a JS shim (like https://github.com/es-shims/es5-shim ) to monkey-patch legacy browsers. And I know that these are just examples, but what is the point of writing:…
comment by paulmcpazzi · 2014-02-06 · in Stop writing For loops. Start using underscore. -
Also the es5-shim library is quite nice, and includes a bind polyfill. https://github.com/es-shims/es5-shim
comment by jbaudanza · 2014-02-01 · in Partial Application in JavaScript using bind() -
…on jQuery by default, even if it is not necessary. [1] https://github.com/WebReflection/ie8 [2] https://github.com/es-shims/es5-shim [3] https://github.com/eligrey/classList.js
comment by superlupo · 2014-01-30 · in You might not need jQuery -
https://github.com/kriskowal/es5-shim
comment by 1wheel · 2013-10-03 · in You Can't JavaScript Under Pressure -
there are shims - the MDN one works well, or you can download this library to shim the whole of ES5 https://github.com/kriskowal/es5-shim (other libraries are availble) Focusing on modern browsers and shimming the old ones is the way to…
comment by gotofritz · 2013-06-07 · in Fun.js – Just a sketch -
If you use es5-shim ( https://github.com/kriskowal/es5-shim ), you can say movePlayer.bind(this, "north") on older browsers.
comment by jeffamcgee · 2013-05-13 · in Using Dispatch Tables to Avoid Conditionals in JavaScript -
…= function (vArg) { return Object.prototype.toString.call(vArg) === "[object Array]"; }; } [1] https://github.com/kriskowal/es5-shim [2] http://underscorejs.org/#isArray
comment by jameswyse · 2013-04-08 · in JavaScript, how do I check if this variable is an array -
…JS methods and functions that missing in IE <= 8. Then you never have to worry about IE again. https://github.com/kriskowal/es5-shim
comment by richardofyork · 2013-03-25 · in Learning JavaScript - my experience and advice -
jQueryIsAwesome, you must not know what an ES5 shim is. It is a cross-browser solution. https://github.com/kriskowal/es5-shim Especially when you note that JavaScript is not just run in browsers these days, and that most server-side…
comment by oinksoft · 2012-02-17 · in Essential JavaScript Design Patterns For Beginners -
I'm a big fan of es5-shim ( https://github.com/kriskowal/es5-shim/ ), which monkey-patches these handy methods in older browsers.
comment by Sidnicious · 2011-04-27 · in Reducing Map: jQuery vs jQuery vs JavaScript