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

autopolyfiller

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autopolyfiller - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

lib/polyfill-code/source/Window.prototype.requestAnimationFrame.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

Version 1.0.10:
* polyfills for `requestAnimationFrame()`, `cancelAnimationFrame()`
* it uses semver to compare versions
Version 1.0.9:

@@ -2,0 +6,0 @@ * polyfills for `btoa()`, `atob()`, `matchMedia()`

@@ -8,2 +8,17 @@ var polyfill = require('polyfill'),

var polyfillsCode = polyfill.source;
// Scan souce folder for polyfills
fs.readdirSync(__dirname + '/source').forEach(function (fileName) {
// Add lazy loader
var polyfillName = fileName.replace(/\.js$/, '');
polyfillsCode.__defineGetter__(polyfillName, function () {
// Lazily load polyfill code
var code = fs.readFileSync(__dirname + '/source/' + fileName, 'utf8');
delete polyfillsCode[polyfillName];
polyfillsCode[polyfillName] = code;
return code;
});
});
debug('got %d polyfills', Object.keys(polyfillsCode).length);

@@ -10,0 +25,0 @@

{
"Opera Mini": [{
"fill": "Promise"
"fill": "Promise Window.prototype.requestAnimationFrame"
}],
"Opera Mobile": [{
"fill": "Promise"
}, {
"min": "10",
"max": "12.1",
"fill": "Window.prototype.requestAnimationFrame"
}],
"Opera": [{
"fill": "Promise"
}, {
"min": "9",
"max": "12.1",
"fill": "Window.prototype.requestAnimationFrame"
}],
"Android": [{
"fill": "Promise"
}, {
"min": "2",
"max": "4.3",
"fill": "Window.prototype.requestAnimationFrame"
}],
"BlackBerry": [{
"fill": "Promise"
"fill": "Promise Window.prototype.requestAnimationFrame"
}],
"Chrome iOS": [{
"fill": "Promise"
"fill": "Promise Window.prototype.requestAnimationFrame"
}],
"Safari iOS": [{
"fill": "Promise"
}, {
"min": "3",
"max": "6.1",
"fill": "Window.prototype.requestAnimationFrame"
}],
"Chrome": [{
"fill": "Promise"
}, {
"min": "4",
"max": "23",
"fill": "Window.prototype.requestAnimationFrame"
}],
"Internet Explorer": [{
"fill": "Promise"
}, {
"min": "6",
"max": "9",
"fill": "Window.prototype.requestAnimationFrame"
}],
"Firefox": [{
"fill": "Promise"
}, {
"min": "2",
"max": "22",
"fill": "Window.prototype.requestAnimationFrame"
}],
"Safari": [{
"fill": "Promise"
}, {
"min": "3",
"max": "6",
"fill": "Window.prototype.requestAnimationFrame"
}]
}
var Browsers = require('autoprefixer/lib/browsers'),
browsersData = require('autoprefixer/data/browsers'),
debug = require('debug')('polyfill:reduce'),
polyfill = require('polyfill');
polyfill = require('polyfill'),
semver = require('semver');

@@ -26,3 +27,25 @@ var polyFillSets = polyfill.agent.js;

/**
* 10 -> 10.0.0
* 11.5 -> 11.5.0
* 1.1.1 -> 1.1.1
*
* @param {string|number} version
* @returns {string}
*/
function toSemver(version) {
return String(version).split('.').concat(0, 0, 0).slice(0, 3).join('.');
}
/**
* @param {string} comparatorName
* @param {string} a
* @param {string} b
* @returns {boolean}
*/
function cmp(comparatorName, a, b) {
return semver[comparatorName](toSemver(a), toSemver(b));
}
/**
*
* @param {String} browserCode

@@ -41,7 +64,7 @@ * @param {String} version

// X === A
(range.only && range.only === version) ||
(range.only && cmp('eq', version, range.only)) ||
// X >= A
(range.min && !range.max && version >= range.min) ||
(range.min && !range.max && cmp('gte', version, range.min)) ||
// A <= X <= B
(range.min && range.max && version >= range.min && version <= range.max) ||
(range.min && range.max && cmp('gte', version, range.min) && cmp('lte', version, range.max)) ||
// Always

@@ -48,0 +71,0 @@ (!range.min && !range.max && !range.only);

4

lib/polyfill-scan/matchers/global.js

@@ -6,3 +6,5 @@ var astQuery = require('grasp-equery').query;

'atob': 'Window.prototype.base64',
'matchMedia': 'Window.prototype.matchMedia'
'matchMedia': 'Window.prototype.matchMedia',
'requestAnimationFrame': 'Window.prototype.requestAnimationFrame',
'cancelAnimationFrame': 'Window.prototype.requestAnimationFrame'
};

@@ -9,0 +11,0 @@

@@ -9,3 +9,7 @@ {

"after": "\n}\n"
},
"Window.prototype.requestAnimationFrame": {
"before": "",
"after": ""
}
}

@@ -5,3 +5,3 @@ {

"keywords": ["polyfill", "polyfills", "dom", "ecmascript", "ecmascript5", "ecmascript6", "postprocessor"],
"version" : "1.0.9",
"version" : "1.0.10",
"author" : "Mikhail Davydov <i@azproduction.ru>",

@@ -24,3 +24,3 @@ "contributors" : [

"grasp-equery": "~0.2.0",
"autoprefixer": "~1.0.20140213",
"autoprefixer": "1.1.x",
"debug": "~0.7.4",

@@ -31,3 +31,4 @@ "node.extend": "~1.0.9",

"globule": "0.2.0",
"mkdirp": "~0.3.5"
"mkdirp": "~0.3.5",
"semver": "~2.2.1"
},

@@ -34,0 +35,0 @@ "devDependencies" : {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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