5.20.0 • Published 4 years ago

mdn-polyfills v5.20.0

Weekly downloads
55,703
License
MIT
Repository
github
Last release
4 years ago

Polyfills copy-pasted from MDN Build Status npm dependencies npm.io

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.keys723
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
Array.prototype.reduce492
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.addEventListener1321
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.closest333
Element.prototype.toggleAttribute243
Element.prototype.matches133
Element.prototype.classList4450
Element.prototype.getAttributeNames182
MouseEvent405
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

5.20.1-canary

4 years ago

5.20.0

4 years ago

5.19.0

4 years ago

5.18.0

5 years ago

5.17.1

5 years ago

5.17.0

5 years ago

5.16.3

5 years ago

5.16.2

5 years ago

5.16.1

5 years ago

5.16.0

5 years ago

5.15.1

5 years ago

5.15.0

5 years ago

5.14.0

5 years ago

5.13.0

5 years ago

5.12.0

6 years ago

5.11.0

6 years ago

5.10.1

6 years ago

5.10.0

6 years ago

5.9.0

6 years ago

5.8.0

6 years ago

5.7.0

6 years ago

5.6.0

6 years ago

5.5.0

6 years ago

5.4.0

6 years ago

5.3.0

6 years ago

5.2.0

6 years ago

5.1.0

7 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.6.0

7 years ago

3.5.0

7 years ago

3.4.0

7 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.2.0

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.0

8 years ago