Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
select: function (context, versions) {
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name, context)
if (!data) return selected
var list = getMajorVersions(data.released, versions)
list = list.map(nameMapper(data.name))
if (data.name === 'android') {
list = filterAndroid(list, versions, context)
}
return selected.concat(list)
}, [])
}
},
function filterByYear (since, context) {
since = since / 1000
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name, context)
if (!data) return selected
var versions = Object.keys(data.releaseDate).filter(function (v) {
return data.releaseDate[v] >= since
})
return selected.concat(versions.map(nameMapper(data.name)))
}, [])
}
select: function (context, versions) {
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name)
if (!data) return selected
var array = getMajorVersions(data.released, versions)
array = array.map(nameMapper(data.name))
return selected.concat(array)
}, [])
}
},
select: function (context, versions) {
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name)
if (!data) return selected
var array = getMajorVersions(data.released, versions)
array = array.map(nameMapper(data.name))
return selected.concat(array)
}, [])
}
},
select: function (context, versions) {
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name)
if (!data) return selected
var array = getMajorVersions(data.released, versions)
array = array.map(nameMapper(data.name))
return selected.concat(array)
}, [])
}
},
function filterByYear (since, context) {
since = since / 1000
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name, context)
if (!data) return selected
var versions = Object.keys(data.releaseDate).filter(function (v) {
return data.releaseDate[v] >= since
})
return selected.concat(versions.map(nameMapper(data.name)))
}, [])
}
select: function () {
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name)
if (!data) return selected
var array = data.versions.filter(function (v) {
return data.released.indexOf(v) === -1
})
array = array.map(nameMapper(data.name))
return selected.concat(array)
}, [])
}
},
select: function (context, versions) {
return Object.keys(agents).reduce(function (selected, name) {
var data = byName(name, context)
if (!data) return selected
var list = getMajorVersions(data.released, versions)
list = list.map(nameMapper(data.name))
if (data.name === 'android') {
list = filterAndroid(list, versions, context)
}
return selected.concat(list)
}, [])
}
},