by sharkbrainguy · 13y ago · 0 comments
> es5-shim.js and es5-shim.min.js monkey-patch a
> JavaScript context to contain all EcmaScript 5
> methods that can be faithfully emulated with a
> legacy JavaScript engine.
It provides Array::map, Array::filter, Array::reduce as defined in Ecmascript 5 along with String::trim and others, as well as replacing buggy implementations.Previous versions of es5-shim included shims for things that cannot be correctly or completely shimmed in ES3 but those have since been separated and I now recommend including es5-shim in basically all web projects to get closer to a modern javascript in most browsers.
And I'm definitely not saying that PHP.js should be used.
[edit] To be more specific, I really don't see the point of using a third-party library when the native methods are available. IMHO, if you choose a language, you should stick with it.