MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / parseCssInt

Function parseCssInt

libs/echarts/echarts-en.simple.js:3791–3796  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

3789}
3790
3791function parseCssInt(str) { // int or percentage.
3792 if (str.length && str.charAt(str.length - 1) === '%') {
3793 return clampCssByte(parseFloat(str) / 100 * 255);
3794 }
3795 return clampCssByte(parseInt(str, 10));
3796}
3797
3798function parseCssFloat(str) { // float or percentage.
3799 if (str.length && str.charAt(str.length - 1) === '%') {

Callers 1

parseFunction · 0.70

Calls 1

clampCssByteFunction · 0.70

Tested by

no test coverage detected