MCPcopy Index your code
hub / github.com/tdewolff/minify / parseCssInt

Function parseCssInt

_benchmarks/sample_echarts.js:2436–2442  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

2434 return f < 0 ? 0 : f > 1 ? 1 : f;
2435 }
2436 function parseCssInt(val) {
2437 var str = val;
2438 if (str.length && str.charAt(str.length - 1) === '%') {
2439 return clampCssByte(parseFloat(str) / 100 * 255);
2440 }
2441 return clampCssByte(parseInt(str, 10));
2442 }
2443 function parseCssFloat(val) {
2444 var str = val;
2445 if (str.length && str.charAt(str.length - 1) === '%') {

Callers 1

parseFunction · 0.85

Calls 1

clampCssByteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…