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

babel-plugin-polyfill-es-shims

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-polyfill-es-shims

A Babel plugin to inject imports to es-shims polyfills

  • 0.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
decreased by-38.55%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-polyfill-es-shims

Install

Using npm:

npm install --save-dev babel-plugin-polyfill-es-shims

or using yarn:

yarn add babel-plugin-polyfill-es-shims --dev

Usage

Add this plugin to your Babel configuration:

{
  "plugins": [["polyfill-es-shims", { "method": "usage-pure" }]]
}

This package supports the usage-pure and usage-global methods.

Supported polyfills

This plugin supports the following es-shims polyfills.

For historical reasons, some of these packages are not under the @es-shims organization. They are explicitly marked in the following tables.

ES5

Builtin object or functionPackage nameOwner
Array.prototype.everyarray.prototype.every
Array.prototype.indexOfarray.prototype.indexof
Array.prototype.lastIndexOfarray.prototype.lastindexof
Array.prototype.maparray.prototype.map
Array.prototype.reducearray.prototype.reduce
Array.prototype.reduceRightarray.prototype.reduceright
Array.prototype.somearray.prototype.some
String.prototype.splitstring.prototype.split

ES2015 (ES6)

Builtin object or functionPackage nameOwner
Array.fromarray.from@mathiasbynens
Array.ofarray.of@mathiasbynens
Array.prototype.entriesarray.prototype.entries
Array.prototype.findarray.prototype.find@paulmillr
Array.prototype.findIndexarray.prototype.findindex@paulmillr
Array.prototype.keysarray.prototype.keys
Array.prototype.valuesarray.prototype.values
Function.prototype.namefunction.prototype.name
Number.isNaNis-nan
Object.assignobject.assign@ljharb
Object.isobject-is
Reflect.ownKeysreflect.ownkeys
RegExp.prototype.flagsregexp.prototype.flags
String.fromCodePointstring.fromcodepoint@mathiasbynens
String.prototype.codePointAtstring.prototype.codepointat@mathiasbynens
String.prototype.endsWithstring.prototype.endswith@mathiasbynens
String.prototype.includesstring.prototype.includes@mathiasbynens
String.prototype.repeatstring.prototype.repeat@mathiasbynens
String.prototype.startWithstring.prototype.startwith@mathiasbynens

ES2016

Builtin object or functionPackage nameOwner
Array.prototype.includesarray-includes

ES2017

Builtin object or functionPackage nameOwner
Object.valuesobject.values
Object.entriesobject.entries
Object.getOwnPropertyDescriptorsobject.getownpropertydescriptors
String.prototype.padStartstring.prototype.padstart
String.prototype.padEndstring.prototype.padend

ES2018

Builtin object or functionPackage nameOwner
Promise.prototype.finallypromise.prototype.finally

ES2019

Builtin object or functionPackage nameOwner
Array.prototype.flatarray.prototype.flat
Array.prototype.flatMaparray.prototype.flatmap
Object.fromEntriesobject.fromentries
String.prototype.trimStartstring.prototype.trimstart
String.prototype.trimEndstring.prototype.trimend
String.prototype.trimLeftstring.prototype.trimleft
String.prototype.trimRightstring.prototype.trimright
Symbol.prototype.descriptionsymbol.prototype.description

ES2020

Builtin object or functionPackage nameOwner
globalThisglobalthis
Promise.allSettledpromise.allsettled
String.prototype.matchAllstring.prototype.matchall

ES2021

Builtin object or functionPackage nameOwner
AggregateError (for Promise.any)es-aggregate-error
Promise.anypromise.any
String.prototype.replaceAllstring.prototype.replaceall

Proposals

Builtin object or functionPackage nameOwner
Array.prototype.itemarray.prototype.item
String.prototype.itemstring.prototype.item

Missing polyfills

NOTE: This polyfill provider is only compatible with polyfills that follow the es-shims-api specification. Additionally, those polyfills must live under the @es-shims organization.

This provider fully supports ES2016+, but we are still working on ES5 and ES6 support. You can find the list of missing polyfills at missing-polyfills.md.

Keywords

FAQs

Package last updated on 09 Dec 2020

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