mdn-polyfills
Advanced tools
Comparing version 5.0.0 to 5.1.0
{ | ||
"name": "mdn-polyfills", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "MDN polyfills", | ||
@@ -45,2 +45,3 @@ "scripts": { | ||
"Element.prototype.matches", | ||
"MouseEvent", | ||
"polyfills", | ||
@@ -57,4 +58,4 @@ "polyfill", | ||
"devDependencies": { | ||
"ava": "^0.21.0", | ||
"babel-cli": "^6.24.1", | ||
"ava": "^0.22.0", | ||
"babel-cli": "^6.26.0", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
@@ -64,5 +65,5 @@ "babel-preset-es2015": "^6.24.1", | ||
"eslint-config-helmut": "^1.2.0", | ||
"eslint-plugin-react": "^7.1.0", | ||
"rollup": "^0.45.2", | ||
"rollup-plugin-babel": "^2.7.1", | ||
"eslint-plugin-react": "^7.3.0", | ||
"rollup": "^0.49.3", | ||
"rollup-plugin-babel": "^3.0.2", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
@@ -69,0 +70,0 @@ "tap-nyan": "^1.1.0" |
# 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)]() | ||
> [MDN](https://developer.mozilla.org) polyfills. A collection of side-effect ECMAScript modules. Minimized, mangled and extremally small thanks to [Rollup](http://rollupjs.org) - next-generation ES6 module bundler. | ||
> [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. | ||
@@ -25,14 +25,21 @@ ## Installation | ||
### [Array.prototype.find](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find?v=control#Polyfill) | ||
### [Array.from](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from?v=control#Polyfill) | ||
```js | ||
import 'mdn-polyfills/Array.prototype.find'; // 358 bytes | ||
import 'mdn-polyfills/Array.from'; // 840 bytes | ||
``` | ||
### [Array.from](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/from?v=control#Polyfill) | ||
### [Array.of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of#Polyfill) | ||
```js | ||
import 'mdn-polyfills/Array.from'; // 840 bytes | ||
import 'mdn-polyfills/Array.of'; // 107 bytes | ||
``` | ||
### [Array.prototype.find](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find?v=control#Polyfill) | ||
```js | ||
import 'mdn-polyfills/Array.prototype.find'; // 358 bytes | ||
``` | ||
### [Array.prototype.forEach](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach?v=control#Polyfill) | ||
@@ -62,8 +69,2 @@ | ||
### [Array.of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of#Polyfill) | ||
```js | ||
import 'mdn-polyfills/Array.of'; // 107 bytes | ||
``` | ||
### [String.prototype.includes](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill) | ||
@@ -99,3 +100,3 @@ | ||
### [Element.prototype.closest](https://developer.mozilla.org/pl/docs/Web/API/Element/closest#Polyfill) | ||
### [Element.prototype.closest](https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill) | ||
@@ -112,4 +113,10 @@ ```js | ||
### [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent#Polyfill) | ||
```js | ||
import 'mdn-polyfills/MouseEvent'; // 312 bytes | ||
``` | ||
# License | ||
MIT © [Michał Jezierski](https://github.com/msn0) |
@@ -8,8 +8,8 @@ const babelrc = require('babelrc-rollup').default; | ||
format: 'iife', | ||
moduleName: 'Polyfill' | ||
name: 'Polyfill' | ||
}; | ||
function input(entry) { | ||
function input(input) { | ||
return { | ||
entry, | ||
input, | ||
plugins: [ babel(babelrc()), uglify() ] | ||
@@ -19,5 +19,5 @@ }; | ||
function output(dest) { | ||
function output(file) { | ||
return function (bundle) { | ||
bundle.write(Object.assign({}, defaultConfig, { dest })); | ||
bundle.write(Object.assign({}, defaultConfig, { file })); | ||
}; | ||
@@ -42,1 +42,2 @@ } | ||
rollup(input('./src/Element.prototype.matches/index.js')).then(output('./Element.prototype.matches.js')); | ||
rollup(input('./src/MouseEvent/index.js')).then(output('./MouseEvent.js')); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32725
66
640
119