Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
commands: test.commands.map(c => {
if (Commands[c.command]) {
let newCmd = Object.assign({}, c)
const type = Commands[c.command]
if (type.target && type.target.name === ArgTypes.variableName.name) {
newCmd.target = migrateVariableName(newCmd.target)
}
if (type.value && type.value.name === ArgTypes.variableName.name) {
newCmd.value = migrateVariableName(newCmd.value)
}
return newCmd
}
return c
}),
})
commands: test.commands.map(c => {
if (Commands[c.command]) {
let newCmd = Object.assign({}, c)
const type = Commands[c.command]
if (type.target && type.target.name === ArgTypes.variableName.name) {
newCmd.target = migrateVariableName(newCmd.target)
}
if (type.value && type.value.name === ArgTypes.variableName.name) {
newCmd.value = migrateVariableName(newCmd.value)
}
return newCmd
}
return c
}),
})