Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ES6 Tools
  3. es6-shim

es6-shim

MITJavaScript0.35.6

ECMAScript 6 compatibility shims for legacy JavaScript engines, providing modern ES6 features in older environments.

Visit WebsiteGitHubGitHub
3.1k stars372 forks0 contributors

What is es6-shim?

ES6 Shim is a JavaScript compatibility library that provides shims for ECMAScript 6 features in legacy JavaScript engines. It solves the problem of inconsistent or missing ES6 support across different browsers and Node.js versions by implementing modern JavaScript APIs like Promises, Maps, Sets, and new array/string methods in environments where they aren't natively available.

Target Audience

JavaScript developers working with legacy browsers or older Node.js versions who need to use ES6 features while maintaining cross-environment compatibility. It's particularly valuable for teams supporting Internet Explorer or other browsers with incomplete ES6 implementations.

Value Proposition

Developers choose ES6 Shim because it provides comprehensive, spec-compliant implementations of ES6 features with a focus on correctness and safety. Unlike some polyfills, it avoids incorrect implementations and offers modular standalone shims, making it a reliable choice for production applications that need consistent ES6 behavior across all environments.

Overview

ECMAScript 6 compatibility shims for legacy JS engines

Use Cases

Best For

  • Adding ES6 support to legacy Internet Explorer browsers
  • Using modern JavaScript features in older Node.js versions
  • Ensuring consistent Promise implementation across different environments
  • Implementing Map and Set collections in browsers without native support
  • Using ES6 string methods like startsWith() and endsWith() in legacy codebases
  • Adding Object.assign() and other ES6 object utilities to older projects

Not Ideal For

  • Applications targeting only modern browsers and Node.js versions with native ES6 support
  • Projects requiring ES2016 or later JavaScript features beyond ES6
  • Teams using build tools like Webpack and wanting to tree-shake polyfills for minimal bundle size
  • Systems with critical performance requirements where any polyfill overhead is prohibitive

Pros & Cons

Pros

Comprehensive ES6 Coverage

Implements a wide array of ES6 features including Map, Set, Promise, and new string/array methods, as detailed in the 'Safe shims' section of the README.

Spec-Compliant Implementation

Prioritizes correctness over polyfilling everything, avoiding incorrect shims like WeakMap and ensuring behavior matches the ES6 specification, as stated in the philosophy.

Modular Standalone Shims

Offers individual npm packages for each feature, allowing developers to include only necessary shims, with many 'a standalone shim is also available' links in the README.

Subclassing Support

Enables subclassing of Map, Set, and Promise with proper prototype chain setup, with code examples provided in the README section on subclassing.

Cons

Missing WeakMap Shim

Does not include a WeakMap implementation because it's impossible to implement correctly in pure JavaScript, limiting completeness for ES6 features as admitted in the README.

External Dependency for Normalize

String.prototype.normalize requires installing the separate 'unorm' package, adding complexity and an extra dependency, as noted in the README section on normalize.

Requires ES5 Shim

Strongly recommends including es5-shim for broken ES5 implementations, increasing setup burden and bundle size, as emphasized in the installation instructions.

Performance Overhead

Polyfilling can introduce performance penalties compared to native implementations, especially for heavy features like Promises or collections, which may impact resource-constrained applications.

Frequently Asked Questions

Quick Stats

Stars3,094
Forks372
Contributors0
Open Issues0
Last commit21 days ago
CreatedSince 2011

Tags

#sets#polyfill#ecmascript#es6-shim#promises#shim#nodejs#legacy-browsers#maps#es6#javascript#compatibility#ecmascript-6

Built With

J
JavaScript
n
npm

Links & Resources

Website

Included in

ES6 Tools4.0k
Auto-fetched 10 hours ago

Related Projects

core-jscore-js

Standard Library

Stars25,526
Forks1,678
Last commit11 hours ago
es6-promisees6-promise

A polyfill for ES6-style Promises

Stars7,247
Forks578
Last commit3 years ago
ES6 shimES6 shim

JavaScript Polyfills, Shims and More

Stars1,351
Forks350
Last commit5 years ago
Object.assignObject.assign

ES2015 Object.assign() ponyfill

Stars917
Forks74
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub