Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loadFeature: function loadFeature (features, name) {
name = name.replace(/[^\w-]/g, '')
if (features[name]) return
// eslint-disable-next-line security/detect-non-literal-require
var compressed = require('caniuse-lite/data/features/' + name + '.js')
var stats = feature(compressed).stats
features[name] = { }
for (var i in stats) {
for (var j in stats[i]) {
features[name][i + ' ' + j] = stats[i][j]
}
}
},
loadFeature: function loadFeature (features, name) {
name = name.replace(/[^\w-]/g, '')
if (features[name]) return
// eslint-disable-next-line security/detect-non-literal-require
var compressed = require('caniuse-lite/data/features/' + name + '.js')
var stats = feature(compressed).stats
features[name] = { }
for (var i in stats) {
for (var j in stats[i]) {
features[name][i + ' ' + j] = stats[i][j]
}
}
},