Home / Function/ isPositiveInteger() — tailwindcss Function Reference

isPositiveInteger() — tailwindcss Function Reference

Architecture documentation for the isPositiveInteger() function in infer-data-type.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  2b202e81_c79a_bf7e_74f9_fe9a98bbea87["isPositiveInteger()"]
  43fe4735_10e8_ed1d_6f4f_74b2008c1b00["infer-data-type.ts"]
  2b202e81_c79a_bf7e_74f9_fe9a98bbea87 -->|defined in| 43fe4735_10e8_ed1d_6f4f_74b2008c1b00
  9d7dff21_77af_5de5_322b_3d9047c15d83["tryValueReplacements()"]
  9d7dff21_77af_5de5_322b_3d9047c15d83 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  4af25bcc_7295_c96c_9ddc_5c19bf644f5e["modernizeArbitraryValuesVariant()"]
  4af25bcc_7295_c96c_9ddc_5c19bf644f5e -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  ea2e9afd_6df0_30cd_1050_8fd383383451["bareIntegers()"]
  ea2e9afd_6df0_30cd_1050_8fd383383451 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  54f63d51_7029_5c8b_5ddf_c0f07d07a3a8["barePercentages()"]
  54f63d51_7029_5c8b_5ddf_c0f07d07a3a8 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  cde8da87_1b33_8777_795b_039d5353e459["barePixels()"]
  cde8da87_1b33_8777_795b_039d5353e459 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  6b15cd17_cf1c_7dc9_3cb8_9ec8797f3814["bareMilliseconds()"]
  6b15cd17_cf1c_7dc9_3cb8_9ec8797f3814 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  e2939b77_29a9_6cc2_06b1_bdc440d4f7e3["bareDegrees()"]
  e2939b77_29a9_6cc2_06b1_bdc440d4f7e3 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  bc208666_57e8_943c_99bd_06a482111eb4["bareAspectRatio()"]
  bc208666_57e8_943c_99bd_06a482111eb4 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  f13fc839_408f_479e_3cdf_9f8f1c424653["bareRepeatValues()"]
  f13fc839_408f_479e_3cdf_9f8f1c424653 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  f2b46398_1cac_b0f2_946b_db57178a0090["registerLegacyUtilities()"]
  f2b46398_1cac_b0f2_946b_db57178a0090 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  1b775438_02d9_5178_6806_405c3c0b5328["createCssUtility()"]
  1b775438_02d9_5178_6806_405c3c0b5328 -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  b1961b55_1394_8973_5694_152fd6b3140a["resolveValueFunction()"]
  b1961b55_1394_8973_5694_152fd6b3140a -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  876035d0_94a8_cf2f_314a_d520aaae6e4b["createVariants()"]
  876035d0_94a8_cf2f_314a_d520aaae6e4b -->|calls| 2b202e81_c79a_bf7e_74f9_fe9a98bbea87
  style 2b202e81_c79a_bf7e_74f9_fe9a98bbea87 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/utils/infer-data-type.ts lines 346–349

export function isPositiveInteger(value: any) {
  let num = Number(value)
  return Number.isInteger(num) && num >= 0 && String(num) === String(value)
}

Domain

Subdomains

Frequently Asked Questions

What does isPositiveInteger() do?
isPositiveInteger() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/utils/infer-data-type.ts.
Where is isPositiveInteger() defined?
isPositiveInteger() is defined in packages/tailwindcss/src/utils/infer-data-type.ts at line 346.
What calls isPositiveInteger()?
isPositiveInteger() is called by 13 function(s): bareAspectRatio, bareDegrees, bareIntegers, bareMilliseconds, barePercentages, barePixels, bareRepeatValues, createCssUtility, and 5 more.

Analyze Your Own Codebase

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

Try Supermodel Free