Function expandNamedParameters

Named parameters under every key sql.js may look them up by. sql.js binds a named value only under the key that matches the placeholder as written (":id", "@id", "$id"); better-sqlite3 takes the bare key ("id"). Expanding every variant lets one payload work on both.

  • Parameters

    • named: Record<string, unknown>

    Returns Record<string, unknown>