Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

es6-shim

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-shim

ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines

  • 0.33.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7M
increased by8.99%
Maintainers
2
Weekly downloads
 
Created

What is es6-shim?

The es6-shim package is designed to provide compatibility shims so that legacy JavaScript engines behave as closely as possible to ECMAScript 6 (ES6). It includes shims for new methods and functions introduced in ES6, allowing developers to use these features in environments that do not yet support them natively.

What are es6-shim's main functionalities?

Array.prototype methods

Adds new methods to Array.prototype like find, findIndex, etc., enabling more expressive operations on arrays.

[1, 2, 3].find(x => x == 2)

String.prototype methods

Introduces new String methods such as startsWith, endsWith, and includes for easier string manipulation.

'hello'.startsWith('hell')

Number properties

Provides new static properties and methods on the Number object like isNaN and isFinite for improved number checking.

Number.isNaN(NaN)

Promises

Implements Promises for asynchronous programming, following the ES6 specification.

new Promise(function(resolve, reject) { resolve(42); })

Maps and Sets

Adds support for new collection types such as Map and Set, offering more options for data storage and manipulation.

new Map([[1, 'one'], [2, 'two']])

Other packages similar to es6-shim

Keywords

FAQs

Package last updated on 11 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc