MCPcopy
hub / github.com/tdewolff/minify / detectValue

Function detectValue

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

Source from the content-addressed store, hash-verified

17791 }
17792
17793 function detectValue(val) {
17794 var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as "number".
17795 // `isFinit('')` get `true`.
17796
17797 if (val != null && isFinite(val) && val !== '') {
17798 return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not;
17799 } else if (beStr && val !== '-') {
17800 return BE_ORDINAL.Must;
17801 }
17802 }
17803
17804 return BE_ORDINAL.Not;
17805 }

Callers 1

doGuessOrdinalFunction · 0.85

Calls 1

isStringFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…