Comment

Comment by sharkbrainguy

If you're after a standard library for Javascript, you could do worse than including es5-shim. Which has the advantage of being a library that (partially) implements a standard: Ecmascript 5.

    > 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.

parent sharkbrainguy 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton