lavamoat
Version:
`lavamoat` is a NodeJS runtime where modules are defined in [SES][SesGithub] Compartments. It aims to reduce the risk of malicious code in the app dependency graph, known as "software supply chain attacks".
18 lines (16 loc) • 398 B
JavaScript
module.exports = {
checkForResolutionOverride,
}
function checkForResolutionOverride(
resolutions,
parentPackageName,
requestedName
) {
if (resolutions && resolutions[parentPackageName]) {
const packageResolutions = resolutions[parentPackageName]
const resolutionsConfig = packageResolutions[requestedName]
if (resolutionsConfig) {
return resolutionsConfig
}
}
}