@backblaze-labs/b2-mcp
    Preparing search index...

    Function assignDefined

    • Copy each listed key from args into target when its value is defined.

      Unifies the "forward optional parameters into the request payload" pattern used across the B2-native tool handlers — the one obvious way to do it, instead of hand-rolling an if (args.x !== undefined) payload.x = args.x chain (or an inline loop) in each handler.

      Type Parameters

      • T extends Record<string, unknown>

      Parameters

      • target: Record<string, unknown>

        Mutable object receiving defined values.

      • args: T

        Parsed source arguments.

      • keys: readonly (keyof T)[]

        Keys to copy when present.

      Returns Record<string, unknown>

      The target object after copying defined values.