Browse
For agents
About
VK Blocks
/
1.126.1
VK Blocks
v1.126.1
Switch version
1.126.4
1.126.3
1.126.1
1.126.2
1.126.0
1.125.0
1.124.0
1.123.0
1.122.0
1.121.0
1.120.0
1.119.2
1.119.1
1.119.0
1.118.7
1.82.0.0
1.82.0.1
1.83.0.0
1.83.0.1
1.84.0.0
1.84.0.1
1.85.0.2
1.85.0.3
1.85.1.0
1.85.1.1
All 287 releases
Overview
Code
vk-blocks
/
src
/
blocks
/
visual-embed
/
utils
/
get-css-length.js
get-css-length.js
10 lines
237 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
export
const
getCssLength
=
(
value
)
=>
{
2
if
(
value
===
null
||
value
===
undefined
||
value
===
'
'
)
{
3
return
undefined
;
4
}
5
6
const
stringValue
=
String
(
value
)
;
7
8
return
/
^
\d
+
$
/
.
test
(
stringValue
)
?
`
${
stringValue
}
px
`
:
stringValue
;
9
}
;
10