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.

Entity Profile

Dependency Diagram

graph LR
  5f1067b8_f14a_5ff8_bf08_9515451be592["infer-data-type.bench.ts"]
  516809a4_c70e_60c3_bbb2_8de4c4572510["infer-data-type.ts"]
  5f1067b8_f14a_5ff8_bf08_9515451be592 --> 516809a4_c70e_60c3_bbb2_8de4c4572510
  e9f456b9_ea98_fa9b_1202_d2c13bcee0d8["inferDataType"]
  5f1067b8_f14a_5ff8_bf08_9515451be592 --> e9f456b9_ea98_fa9b_1202_d2c13bcee0d8
  696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"]
  5f1067b8_f14a_5ff8_bf08_9515451be592 --> 696bd648_5f24_1b59_8e8b_7a97a692869e
  style 5f1067b8_f14a_5ff8_bf08_9515451be592 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 OxideEngine 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: 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