mdn-polyfills

MDN polyfills

Polyfills copy-pasted from MDN

MDNpolyfills. 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

HomePage

https://github.com/msn0/mdn-polyfills#readme

Repository

https+https://github.com/msn0/mdn-polyfills


上一篇:ng-abtest
下一篇:zombie-player

相关推荐

  • 早读清单:MDN JavaScript 标准内置对象 Date

    清单 MDN JavaScript 标准内置对象 Date 准备 扩展...

    3 个月前
  • 手动实现bind函数(附MDN提供的Polyfill方案解析)

    update: 20180605 原文链接(https://lvdingjin.github.io/tech/2018/06/05/achievebind.html) 为什么要自己去实现一个bi...

    2 年前
  • 对polyfills HTML5的意义是什么?

    nullpointerJitendra Vyas(https://stackoverflow.com/users/1746118/nullpointer)提出了一个问题:What is the mea...

    2 年前
  • umdname

    adapt umd module types to alternative formats umdname ======= (c)Bumblehead0, 2016 MITlicense(licen...

    9 个月前
  • rollup-plugin-node-polyfills

    undefined rolluppluginnodepolyfills === Allows the node builtins to be d/ed. The following modu...

    2 个月前
  • polyfills-loader

    Tool for polyfilling js and browser features on demand permalink: 'building/polyfillsloader.html' ...

    10 小时前
  • polyfills-db

    browser feature database polyfills db NPM versionnpmimagenpmurl Build statustravisimagetravisurl...

    10 个月前
  • polyfills

    useragentbased polyfill combinator Polyfills NPM versionnpmimagenpmurl Build statustravisimagetr...

    10 个月前
  • mdns-js

    JavaScript/NodeJS mDNS discovery implementation mDNSjs ========== Build Status(https://travisci.or...

    1 年前
  • mdns

    multicast DNS service discovery mdns node.js Service Discovery Package: mdns Description: mult...

    6 个月前

官方社区

扫码加入 JavaScript 社区