Home / File/ default-map.ts — tailwindcss Source File

default-map.ts — tailwindcss Source File

Architecture documentation for default-map.ts, a typescript file in the tailwindcss codebase. 0 imports, 28 dependents.

File typescript PostCSSPlugin AST 28 dependents 1 classes

Entity Profile

Dependency Diagram

graph LR
  28a2f72d_350c_6647_bf9d_77c69e637045["default-map.ts"]
  bd16b7ea_bbf0_4269_b855_66ce2c516e3e["instrumentation.ts"]
  bd16b7ea_bbf0_4269_b855_66ce2c516e3e --> 28a2f72d_350c_6647_bf9d_77c69e637045
  6219568c_788d_e9f4_1518_104d7994cc7f["source-maps.ts"]
  6219568c_788d_e9f4_1518_104d7994cc7f --> 28a2f72d_350c_6647_bf9d_77c69e637045
  9106ed35_a5a8_5f41_7f5e_a6fe5287f68d["ast.ts"]
  9106ed35_a5a8_5f41_7f5e_a6fe5287f68d --> 28a2f72d_350c_6647_bf9d_77c69e637045
  c30c28f2_b6df_e90d_67d1_db074bef35a5["analyze.ts"]
  c30c28f2_b6df_e90d_67d1_db074bef35a5 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  391ead49_f8b5_2b23_a9fe_31a150c72620["link.ts"]
  391ead49_f8b5_2b23_a9fe_31a150c72620 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  7095171e_98e6_6fd0_2293_1fc8bac82300["migrate-media-screen.ts"]
  7095171e_98e6_6fd0_2293_1fc8bac82300 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  a1d91fdc_e00f_534f_abf6_a58adf4778f1["sort-buckets.ts"]
  a1d91fdc_e00f_534f_abf6_a58adf4778f1 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  79c4e61a_7f2e_53a0_300b_705f6b159958["split.ts"]
  79c4e61a_7f2e_53a0_300b_705f6b159958 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  d5e14c3d_f7c4_162e_96e8_83915119d547["is-safe-migration.ts"]
  d5e14c3d_f7c4_162e_96e8_83915119d547 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  b221facd_4d62_d2ce_4a2c_e77999b7a5ae["migrate-legacy-classes.ts"]
  b221facd_4d62_d2ce_4a2c_e77999b7a5ae --> 28a2f72d_350c_6647_bf9d_77c69e637045
  930146af_7164_8be9_737f_e83f06ce8ce8["migrate.test.ts"]
  930146af_7164_8be9_737f_e83f06ce8ce8 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  e39bed3f_bfbf_a8c6_90a0_aa2ce3be1ef4["migrate.ts"]
  e39bed3f_bfbf_a8c6_90a0_aa2ce3be1ef4 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  3570f589_2f69_c1ce_f4d4_16edf9b89280["packages.ts"]
  3570f589_2f69_c1ce_f4d4_16edf9b89280 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  472e1b98_afcf_f1f2_ad91_916d742bb731["version.ts"]
  472e1b98_afcf_f1f2_ad91_916d742bb731 --> 28a2f72d_350c_6647_bf9d_77c69e637045
  style 28a2f72d_350c_6647_bf9d_77c69e637045 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * A Map that can generate default values for keys that don't exist.
 * Generated default values are added to the map to avoid recomputation.
 */
export class DefaultMap<T = string, V = any> extends Map<T, V> {
  constructor(private factory: (key: T, self: DefaultMap<T, V>) => V) {
    super()
  }

  get(key: T): V {
    let value = super.get(key)

    if (value === undefined) {
      value = this.factory(key, this)
      this.set(key, value)
    }

    return value
  }
}

Domain

Subdomains

Classes

Frequently Asked Questions

What does default-map.ts do?
default-map.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the PostCSSPlugin domain, AST subdomain.
What files import default-map.ts?
default-map.ts is imported by 28 file(s): analyze.ts, apply.ts, ast.ts, ast.ts, candidate.ts, canonicalize-candidates.test.ts, canonicalize-candidates.ts, design-system.ts, and 20 more.
Where is default-map.ts in the architecture?
default-map.ts is located at packages/tailwindcss/src/utils/default-map.ts (domain: PostCSSPlugin, subdomain: AST, directory: packages/tailwindcss/src/utils).

Analyze Your Own Codebase

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

Try Supermodel Free