Skip to content

Commit

Permalink
Update polyfills to use core-js. (prebid#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanek authored and dluxemburg committed Jul 17, 2018
1 parent cdebeb7 commit ca2f15d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"yargs": "^1.3.1"
},
"dependencies": {
"array-includes": "^3.0.2",
"array.prototype.find": "^2.0.3"
"core-js": "^2.4.1"
}
}
12 changes: 2 additions & 10 deletions src/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
Misc polyfills
*/
/*jshint -W121 */
import shimArrayFind from 'array.prototype.find/shim';
import shimArrayIncludes from 'array-includes/shim';

if (!Array.prototype.find) {
shimArrayFind();
}

if (!Array.prototype.includes) {
shimArrayIncludes();
}
require('core-js/fn/array/find');
require('core-js/fn/array/includes');

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger
Number.isInteger = Number.isInteger || function(value) {
Expand Down
14 changes: 5 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ babel-polyfill@^6.13.0:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"

babel-preset-es2015@^6.5.0:
babel-preset-es2015@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
dependencies:
Expand Down Expand Up @@ -1857,7 +1857,7 @@ d@1:
dependencies:
es5-ext "^0.10.9"

"dargs@github:christian-bromann/dargs":
dargs@christian-bromann/dargs:
version "4.0.1"
resolved "https://codeload.github.com/christian-bromann/dargs/tar.gz/7d6d4164a7c4106dbd14ef39ed8d95b7b5e9b770"
dependencies:
Expand Down Expand Up @@ -2353,11 +2353,11 @@ escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"

escape-string-regexp@1.0.2, escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2:
escape-string-regexp@1.0.2, escape-string-regexp@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1"

escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.5:
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.5, escape-string-regexp@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

Expand Down Expand Up @@ -4853,11 +4853,7 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"

lru-cache@2:
version "2.7.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"

lru-cache@2.2.x:
lru-cache@2, lru-cache@2.2.x:
version "2.2.4"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"

Expand Down

0 comments on commit ca2f15d

Please sign in to comment.