Home / Function/ toArrayWithKey() — supabase Function Reference

toArrayWithKey() — supabase Function Reference

Architecture documentation for the toArrayWithKey() function in helpers.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  5d7f4cb4_0247_6736_6311_da72fe2e68fc["toArrayWithKey()"]
  16236cbf_2788_d391_f773_56bb62d808aa["gen_v3()"]
  16236cbf_2788_d391_f773_56bb62d808aa -->|calls| 5d7f4cb4_0247_6736_6311_da72fe2e68fc
  167c5e66_f623_cbb8_77f7_298cdb145d98["gen_v2()"]
  167c5e66_f623_cbb8_77f7_298cdb145d98 -->|calls| 5d7f4cb4_0247_6736_6311_da72fe2e68fc
  style 5d7f4cb4_0247_6736_6311_da72fe2e68fc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/generator/helpers.ts lines 36–42

export const toArrayWithKey = (obj: object, keyAs: string) =>
  values(
    mapValues(obj, (value: any, key: string) => {
      value[keyAs] = key
      return value
    })
  )

Subdomains

Called By

Frequently Asked Questions

What does toArrayWithKey() do?
toArrayWithKey() is a function in the supabase codebase.
What calls toArrayWithKey()?
toArrayWithKey() is called by 2 function(s): gen_v2, gen_v3.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free