Home / File/ infer-data-type.bench.ts — tailwindcss Source File

infer-data-type.bench.ts — tailwindcss Source File

Architecture documentation for infer-data-type.bench.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.

File typescript Oxide 3 imports

Entity Profile

Dependency Diagram

graph LR
  760e0810_9a69_15f3_c742_23d1f3eba2be["infer-data-type.bench.ts"]
  43fe4735_10e8_ed1d_6f4f_74b2008c1b00["infer-data-type.ts"]
  760e0810_9a69_15f3_c742_23d1f3eba2be --> 43fe4735_10e8_ed1d_6f4f_74b2008c1b00
  6f422594_e782_07e7_7b41_29a3f93e32b9["inferDataType"]
  760e0810_9a69_15f3_c742_23d1f3eba2be --> 6f422594_e782_07e7_7b41_29a3f93e32b9
  f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3["vitest"]
  760e0810_9a69_15f3_c742_23d1f3eba2be --> f1e05e5f_c1b2_a3f5_b2e8_3317b9243ac3
  style 760e0810_9a69_15f3_c742_23d1f3eba2be fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { bench, expect, test } from 'vitest'
import { inferDataType } from './infer-data-type'

const colors = [
  'slateblue',
  'black',
  'orange',
  'rgb(255, 255, 255)',
  'rgba(255, 255, 255, 1)',
  'hsl(0, 0%, 100%)',
  'hsla(0, 0%, 100%, 1)',
  'hwb(0, 0%, 100%)',
  'color(red a(1))',
  'lab(0 0 0)',
  'lch(0 0 0)',
  'oklab(0 0 0)',
  'oklch(0 0 0)',
  'light-dark(#fff #000)',
  'color-mix(#fff #000)',
]

bench('colors', () => {
  for (let color of colors) {
    inferDataType(color, ['color'])
  }
})

test('colors', () => {
  for (let color of colors) {
    expect(inferDataType(color, ['color'])).toBe('color')
  }
})

Domain

Dependencies

Frequently Asked Questions

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