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.6.1
  • 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
Number.prototype.toExponentialnumber.prototype.toexponential
String.prototype.splitstring.prototype.split
String.prototype.trimstring.prototype.trim

ES2015 (ES6)

Builtin object or functionPackage nameOwner
Array.fromarray.from@mathiasbynens
Array.ofarray.of@mathiasbynens
Array.prototype.copyWithinarray.prototype.copywithin
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
Math.acoshmath.acosh
Math.atanhmath.atanh
Math.clz32math.clz32
Math.cbrtmath.cbrt
Math.froundmath.fround
Math.imulmath.log1p
Math.log10math.log1p
Math.log1pmath.log1p
Math.signmath.sign
Number.isNaNis-nan
Object.assignobject.assign@ljharb
Object.getPrototypeOfobject.getprototypeof
Object.isobject-is
Reflect.applyreflect.apply
Reflect.getPrototypeOfreflect.getprototypeof
Reflect.ownKeysreflect.ownkeys
RegExp.prototype.flagsregexp.prototype.flags
String.fromCodePointstring.fromcodepoint@mathiasbynens
String.rawstring.raw
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
Annex B String.prototype.*es-string-html-methods

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 15 Jan 2022

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