Home / Function/ get() — tailwindcss Function Reference

get() — tailwindcss Function Reference

Architecture documentation for the get() function in plugin-functions.ts from the tailwindcss codebase.

Function typescript OxideEngine Scanner calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  760be792_5eb1_da6f_e22b_2c4b123c6248["get()"]
  20b59de8_11c6_2432_2a83_24f6f6e741a7["plugin-functions.ts"]
  760be792_5eb1_da6f_e22b_2c4b123c6248 -->|defined in| 20b59de8_11c6_2432_2a83_24f6f6e741a7
  d30151e4_eee8_a868_f516_c653088f4a03["createThemeFn()"]
  d30151e4_eee8_a868_f516_c653088f4a03 -->|calls| 760be792_5eb1_da6f_e22b_2c4b123c6248
  00a6c74c_0751_dcea_d32a_e486a30355a4["readFromCss()"]
  00a6c74c_0751_dcea_d32a_e486a30355a4 -->|calls| 760be792_5eb1_da6f_e22b_2c4b123c6248
  378e03e8_d700_b258_53b3_5bd078db1e2b["get()"]
  760be792_5eb1_da6f_e22b_2c4b123c6248 -->|calls| 378e03e8_d700_b258_53b3_5bd078db1e2b
  style 760be792_5eb1_da6f_e22b_2c4b123c6248 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/compat/plugin-functions.ts lines 222–245

function get(obj: any, path: string[]) {
  for (let i = 0; i < path.length; ++i) {
    let key = path[i]

    // The key does not exist so concatenate it with the next key
    if (obj?.[key] === undefined) {
      if (path[i + 1] === undefined) {
        return undefined
      }

      path[i + 1] = `${key}-${path[i + 1]}`
      continue
    }

    // We never want to index into strings
    if (typeof obj === 'string') {
      return undefined
    }

    obj = obj[key]
  }

  return obj
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does get() do?
get() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/compat/plugin-functions.ts.
Where is get() defined?
get() is defined in packages/tailwindcss/src/compat/plugin-functions.ts at line 222.
What does get() call?
get() calls 1 function(s): get.
What calls get()?
get() is called by 2 function(s): createThemeFn, readFromCss.

Analyze Your Own Codebase

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

Try Supermodel Free