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
  4e39f1e7_ebcb_7f62_4a59_b645e71d50fd["isPositiveInteger()"]
  516809a4_c70e_60c3_bbb2_8de4c4572510["infer-data-type.ts"]
  4e39f1e7_ebcb_7f62_4a59_b645e71d50fd -->|defined in| 516809a4_c70e_60c3_bbb2_8de4c4572510
  42b4defe_f5ba_2195_5bc6_48ede8ab230e["tryValueReplacements()"]
  42b4defe_f5ba_2195_5bc6_48ede8ab230e -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  8097972e_4628_663f_72e8_08883183690d["modernizeArbitraryValuesVariant()"]
  8097972e_4628_663f_72e8_08883183690d -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  cab0078b_e100_9b6d_7fb5_0d1f7149df87["bareIntegers()"]
  cab0078b_e100_9b6d_7fb5_0d1f7149df87 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  13989a7d_adcf_4a05_988b_d7cc13b5fc7f["barePercentages()"]
  13989a7d_adcf_4a05_988b_d7cc13b5fc7f -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  cb8409cb_73c6_ea47_d2ae_416489056a05["barePixels()"]
  cb8409cb_73c6_ea47_d2ae_416489056a05 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  7cec0059_f7d5_930f_60ee_a6737012d9d4["bareMilliseconds()"]
  7cec0059_f7d5_930f_60ee_a6737012d9d4 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  b230f465_37cb_971a_0426_37bb7e311c08["bareDegrees()"]
  b230f465_37cb_971a_0426_37bb7e311c08 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  b73c5395_40c1_3e76_54b4_fe5a4f84c4d1["bareAspectRatio()"]
  b73c5395_40c1_3e76_54b4_fe5a4f84c4d1 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  6befe538_a135_4b30_7357_7f464e5a8bf5["bareRepeatValues()"]
  6befe538_a135_4b30_7357_7f464e5a8bf5 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  474da8ab_bb82_dc1d_4a87_5aea9d83e92b["registerLegacyUtilities()"]
  474da8ab_bb82_dc1d_4a87_5aea9d83e92b -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  75cdf0b0_3569_52fd_7186_577645fd4872["createCssUtility()"]
  75cdf0b0_3569_52fd_7186_577645fd4872 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  3df007ff_869c_dbfa_d21c_be64d5ce3eec["resolveValueFunction()"]
  3df007ff_869c_dbfa_d21c_be64d5ce3eec -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  c1a769fc_95ca_ceea_62f9_aedeeedf7c66["createVariants()"]
  c1a769fc_95ca_ceea_62f9_aedeeedf7c66 -->|calls| 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd
  style 4e39f1e7_ebcb_7f62_4a59_b645e71d50fd 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)
}

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