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

mdn-polyfills

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdn-polyfills

MDN polyfills

  • 5.16.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36K
increased by10.42%
Maintainers
1
Weekly downloads
 
Created
Source

Polyfills copy-pasted from MDN Build Status npm dependencies

MDN polyfills. A collection of side-effect ECMAScript modules. Minimized, mangled and extremely small thanks to Rollup - next-generation ES6 module bundler.

Installation

npm i mdn-polyfills --save

Usage

import 'mdn-polyfills/POLYFILL_NAME';

// For example:

// (ES6 Modules)
import 'mdn-polyfills/Array.prototype.includes';
import 'mdn-polyfills/Object.create';

// (CommonJS)
require('mdn-polyfills/CustomEvent');
require('mdn-polyfills/String.prototype.padStart');

// and so on ...

Polyfills are also available over a CDN, for example

<script src="https://unpkg.com/mdn-polyfills/Object.assign"></script>
<script src="https://cdn.jsdelivr.net/npm/mdn-polyfills/NodeList.prototype.forEach.js"></script>

Supported polyfills

namesize [b]
Object.assign274
Object.create299
Object.entries151
Object.values142
Array.from788
Array.of79
Array.prototype.fill343
Array.prototype.filter300
Array.prototype.find330
Array.prototype.findIndex362
Array.prototype.forEach328
Array.prototype.includes346
Array.prototype.some346
String.prototype.includes153
String.prototype.repeat504
String.prototype.startsWith117
String.prototype.endsWith148
String.prototype.padStart209
String.prototype.padEnd205
String.prototype.trim121
Function.prototype.bind427
Node.prototype.append433
Node.prototype.prepend452
Node.prototype.before440
Node.prototype.after461
Node.prototype.remove290
Node.prototype.replaceWith731
Node.prototype.children245
Node.prototype.firstElementChild262
NodeList.prototype.forEach158
Element.prototype.closest386
Element.prototype.toggleAttribute243
Element.prototype.matches133
Element.prototype.classList4434
MouseEvent281
CustomEvent279
Number.isInteger106
Number.isNaN53
HTMLCanvasElement.prototype.toBlob276

License

The mdn-polyfills as a module is licensed under MIT © Michał Jezierski
Polyfills are licensed under https://developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses

Keywords

FAQs

Package last updated on 24 Feb 2019

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