Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'#title': 'title',
'#value': 'value'
},
ExpressionAttributeValues: {
':title': title,
':value': value
},
ReturnValues: 'NONE'
}
await dynamoDocClient()
.update(params)
.promise()
const metrics = createMetricsLogger()
metrics.putMetric('EntryWords', title.trim().split(/s/).length, Unit.Count)
await metrics.flush()
return {
entId,
title,
value
}
}
title,
value
}
},
ReturnValues: 'ALL_NEW'
}
const {
Attributes: { entries }
} = await dynamoDocClient()
.update(params)
.promise()
const metrics = createMetricsLogger()
metrics.putMetric('NumEntries', Object.keys(entries).length, Unit.Count)
metrics.putMetric('EntryWords', title.trim().split(/s/).length, Unit.Count)
await metrics.flush()
return {
entId,
title,
value
}
}