src/expressions/update.ts
Function getUpdateExpression
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getUpdateExpression(params: IUpdateInput = {}) {
if (!params.Update) return params;
const { Update, UpdateAction = "SET", ...restOfParams } = params;
const { ExpressionAttributeNames = {}, ExpressionAttributeValues = {} } =
Function getExpressionAttributes
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getExpressionAttributes(params: IUpdateInput) {
const { Update = {}, UpdateAction = "SET" } = params;
return Object.entries(Update).reduce((acc, [key, value]) => {
if (!acc.ExpressionAttributeNames) acc.ExpressionAttributeNames = {};