split_css_unit() — svelte Function Reference
Architecture documentation for the split_css_unit() function in index.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 489df91f_524a_a032_194d_cf9e45c790d7["split_css_unit()"] 8795a504_2189_bf07_fb96_096bc8c92d25["index.js"] 489df91f_524a_a032_194d_cf9e45c790d7 -->|defined in| 8795a504_2189_bf07_fb96_096bc8c92d25 167c3f15_018c_2742_ff4b_f7dff6348754["blur()"] 167c3f15_018c_2742_ff4b_f7dff6348754 -->|calls| 489df91f_524a_a032_194d_cf9e45c790d7 2ebfb46e_13fe_d693_c310_2dd05bee5fc0["fly()"] 2ebfb46e_13fe_d693_c310_2dd05bee5fc0 -->|calls| 489df91f_524a_a032_194d_cf9e45c790d7 style 489df91f_524a_a032_194d_cf9e45c790d7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/transition/index.js lines 26–29
function split_css_unit(value) {
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
return split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does split_css_unit() do?
split_css_unit() is a function in the svelte codebase, defined in packages/svelte/src/transition/index.js.
Where is split_css_unit() defined?
split_css_unit() is defined in packages/svelte/src/transition/index.js at line 26.
What calls split_css_unit()?
split_css_unit() is called by 2 function(s): blur, fly.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free