Home / File/ to-key-path.test.ts — tailwindcss Source File

to-key-path.test.ts — tailwindcss Source File

Architecture documentation for to-key-path.test.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  1f67cad2_89b7_73d4_1d18_ba4272a72fae["to-key-path.test.ts"]
  e3e0c6b9_7cc3_bd6c_ce01_14f8efdc5a0d["to-key-path.ts"]
  1f67cad2_89b7_73d4_1d18_ba4272a72fae --> e3e0c6b9_7cc3_bd6c_ce01_14f8efdc5a0d
  1b250eae_0bea_d404_ca9e_42da26c56b45["toKeyPath"]
  1f67cad2_89b7_73d4_1d18_ba4272a72fae --> 1b250eae_0bea_d404_ca9e_42da26c56b45
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  1f67cad2_89b7_73d4_1d18_ba4272a72fae --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  style 1f67cad2_89b7_73d4_1d18_ba4272a72fae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { expect, it } from 'vitest'
import { toKeyPath } from './to-key-path'

it('can convert key paths to arrays', () => {
  expect(toKeyPath('fontSize.xs')).toEqual(['fontSize', 'xs'])
  expect(toKeyPath('fontSize.xs[1].lineHeight')).toEqual(['fontSize', 'xs', '1', 'lineHeight'])
  expect(toKeyPath('colors.red.500')).toEqual(['colors', 'red', '500'])
  expect(toKeyPath('colors[red].500')).toEqual(['colors', 'red', '500'])
  expect(toKeyPath('colors[red].[500]')).toEqual(['colors', 'red', '500'])
  expect(toKeyPath('colors[red]500')).toEqual(['colors', 'red', '500'])
  expect(toKeyPath('colors[red][500]')).toEqual(['colors', 'red', '500'])
  expect(toKeyPath('colors[red]500[50]5')).toEqual(['colors', 'red', '500', '50', '5'])
})

Domain

Dependencies

Frequently Asked Questions

What does to-key-path.test.ts do?
to-key-path.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does to-key-path.test.ts depend on?
to-key-path.test.ts imports 3 module(s): to-key-path.ts, toKeyPath, vitest.
Where is to-key-path.test.ts in the architecture?
to-key-path.test.ts is located at packages/tailwindcss/src/utils/to-key-path.test.ts (domain: OxideEngine, 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