# mdn-polyfills

> MDN polyfills

Latest version **5.20.0** (published 2020-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install mdn-polyfills
pnpm add mdn-polyfills
yarn add mdn-polyfills
bun add mdn-polyfills
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.20.0 |
| Published | 2020-01-30 |
| First published | 2016-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 28.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 175 |
| Maintainers | michal.jezierski |
| Keywords | assign, create, of, from, find, forEach, fill, filter, findIndex, firstElementChild, includes, some, reduce, repeat, startsWith, endsWith, bind, closest, toggleAttribute, matches, isInteger, isNaN, toBlob, Object.assign, Object.create, Object.entries, Object.keys, Object.values, Array.of, Array.from, Array.prototype.fill, Array.prototype.find, Array.prototype.forEach, Array.prototype.filter, Array.prototype.findIndex, Array.prototype.includes, Array.prototype.some, Array.prototype.reduce, String.prototype.includes, String.prototype.repeat, String.prototype.startsWith, String.prototype.endsWith, String.prototype.padStart, String.prototype.padEnd, String.prototype.trim, Node.prototype.addEventListener, Node.prototype.append, Node.prototype.prepend, Node.prototype.before, Node.prototype.after, Node.prototype.remove, Node.prototype.replaceWith, Node.prototype.children, Node.prototype.firstElementChild, NodeList.prototype.forEach, Function.prototype.bind, Element.prototype.closest, Element.prototype.toggleAttribute, Element.prototype.matches, Element.prototype.classList, Element.prototype.getAttributeNames, HTMLCanvasElement.prototype.toBlob, MouseEvent, CustomEvent, Number.isInteger, Number.isNaN, polyfills, polyfill, mdn |

## Links

- npm: https://www.npmjs.com/package/mdn-polyfills
- Repository: https://github.com/msn0/mdn-polyfills
- Homepage: https://github.com/msn0/mdn-polyfills#readme
- Issues: https://github.com/msn0/mdn-polyfills/issues
- npm.io page: https://npm.io/package/mdn-polyfills

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 5.20.0 (latest) — 2020-01-30
- 5.20.1-canary (canary) — 2020-07-29
- 5.19.0 — 2019-10-18
- 5.18.0 — 2019-07-12
- 5.17.1 — 2019-06-24
- 5.17.0 — 2019-06-04
- 5.16.3 — 2019-05-22
- 5.16.2 — 2019-05-22
- 5.16.1 — 2019-05-11
- 5.16.0 — 2019-02-24
- 5.15.1 — 2019-02-12
- 5.15.0 — 2018-12-18
- 5.14.0 — 2018-11-28
- 5.13.0 — 2018-10-29
- 5.12.0 — 2018-09-08
- … 27 more at https://npm.io/package/mdn-polyfills/versions

## README

# Polyfills copy-pasted from MDN [![Build Status](https://travis-ci.org/msn0/mdn-polyfills.svg?branch=master)](http://travis-ci.org/msn0/mdn-polyfills) [![npm](https://img.shields.io/npm/dt/mdn-polyfills.svg)](https://www.npmjs.com/package/mdn-polyfills) ![dependencies](https://david-dm.org/msn0/mdn-polyfills.svg) [![](https://data.jsdelivr.com/v1/package/npm/mdn-polyfills/badge)](https://www.jsdelivr.com/package/npm/mdn-polyfills)

> [MDN](https://developer.mozilla.org) polyfills. A collection of side-effect ECMAScript modules. Minimized, mangled and extremely small thanks to [Rollup](https://rollupjs.org) - next-generation ES6 module bundler.

## Installation

```
npm i mdn-polyfills --save
```

## Usage

```js
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

```html
<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

|name|size [b]|
|----|-------:|
|[Object.assign](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill)|274|
|[Object.create](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Polyfill)|299|
|[Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries)|151|
|[Object.keys](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)|723|
|[Object.values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values)|142|
|[Array.from](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from?v=control#Polyfill)|788|
|[Array.of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of#Polyfill)|79|
|[Array.prototype.fill](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill)|343|
|[Array.prototype.filter](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter?v=control#Polyfill)|300|
|[Array.prototype.find](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find?v=control#Polyfill)|330|
|[Array.prototype.findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex?v=control#Polyfill)|362|
|[Array.prototype.forEach](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach?v=control#Polyfill)|328|
|[Array.prototype.includes](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/includes?v=control#Polyfill)|346|
|[Array.prototype.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some#Polyfill)|346|
|[Array.prototype.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Polyfill)|492|
|[String.prototype.includes](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill)|153|
|[String.prototype.repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat#Polyfill)|504|
|[String.prototype.startsWith](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill)|117|
|[String.prototype.endsWith](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith#Polyfill)|148|
|[String.prototype.padStart](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart#Polyfill)|209|
|[String.prototype.padEnd](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd#Polyfill)|205|
|[String.prototype.trim](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill)|121|
|[Function.prototype.bind](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind#Polyfill)|427|
|[Node.prototype.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Compatibility)|1321|
|[Node.prototype.append](https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append#Polyfill)|433|
|[Node.prototype.prepend](https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/prepend#Polyfill)|452|
|[Node.prototype.before](https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/before#Polyfill)|440|
|[Node.prototype.after](https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/after#Polyfill)|461|
|[Node.prototype.remove](https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove#Polyfill)|290|
|[Node.prototype.replaceWith](https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/replaceWith#Polyfill)|731|
|[Node.prototype.children](https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/children#Polyfill)|245|
|[Node.prototype.firstElementChild](https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/firstElementChild#Polyfill_for_IE8_IE9_and_Safari)|262|
|[NodeList.prototype.forEach](https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach#Polyfill)|158|
|[Element.prototype.closest](https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill)|333|
|[Element.prototype.toggleAttribute](https://developer.mozilla.org/en-US/docs/Web/API/Element/toggleAttribute#Polyfill)|243|
|[Element.prototype.matches](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill)|133|
|[Element.prototype.classList](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList#Polyfill)|4450|
|[Element.prototype.getAttributeNames](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNames#Polyfill)|182|
|[MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent#Polyfill)|405|
|[CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill)|279|
|[Number.isInteger](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger#Polyfill)|106|
|[Number.isNaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill)|53|
|[HTMLCanvasElement.prototype.toBlob](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#Polyfill)|276|

# License

The mdn-polyfills as a module is licensed under MIT © [Michał Jezierski](https://github.com/msn0)<br/>
Polyfills are licensed under https://developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses

---
_Source: https://npm.io/package/mdn-polyfills · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
