core-js-compat
Advanced tools
Comparing version 3.6.0 to 3.6.1
{ | ||
"name": "core-js-compat", | ||
"description": "core-js compat", | ||
"version": "3.6.0", | ||
"version": "3.6.1", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -30,22 +30,20 @@ 'use strict'; | ||
function browserslistEntries(targets) { | ||
return browserslist(targets).map(it => it.split(' ')); | ||
} | ||
module.exports = function (targets) { | ||
let list; | ||
if (typeof targets == 'object' && !Array.isArray(targets)) { | ||
const { esmodules, browsers, node, ...rest } = targets; | ||
list = Object.entries(rest); | ||
if (esmodules) { | ||
list = list.concat(Object.entries(external.modules)); | ||
} | ||
if (browsers) { | ||
list = list.concat(browserslistEntries(browsers)); | ||
} | ||
if (node) { | ||
list.push(['node', node === 'current' ? process.versions.node : node]); | ||
} | ||
} else list = browserslistEntries(targets); | ||
if (typeof targets !== 'object' || Array.isArray(targets)) { | ||
targets = { browsers: targets }; | ||
} | ||
const { browsers, esmodules, node, ...rest } = targets; | ||
const list = Object.entries(rest); | ||
if (browsers) { | ||
list.push(...browserslist(browsers).map(it => it.split(' '))); | ||
} | ||
if (esmodules) { | ||
list.push(...Object.entries(external.modules)); | ||
} | ||
if (node) { | ||
list.push(['node', node === 'current' ? process.versions.node : node]); | ||
} | ||
const normalized = list.map(([engine, version]) => { | ||
@@ -52,0 +50,0 @@ if (has(browserslist.aliases, engine)) { |
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
298977
11934