tuplo/dynoexpr

View on GitHub
src/expressions/update.ts

Summary

Maintainability
A
3 hrs
Test Coverage
A
98%

Function getUpdateExpression has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function getUpdateExpression(params: IUpdateInput = {}) {
    if (!params.Update) return params;

    const { Update, UpdateAction = "SET", ...restOfParams } = params;
    const { ExpressionAttributeNames = {}, ExpressionAttributeValues = {} } =
Severity: Major
Found in src/expressions/update.ts - About 2 hrs to fix

    Function getExpressionAttributes has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function getExpressionAttributes(params: IUpdateInput) {
        const { Update = {}, UpdateAction = "SET" } = params;
    
        return Object.entries(Update).reduce((acc, [key, value]) => {
            if (!acc.ExpressionAttributeNames) acc.ExpressionAttributeNames = {};
    Severity: Minor
    Found in src/expressions/update.ts - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status