MCPcopy Index your code
hub / github.com/apache/echarts / convertOptionIdName

Function convertOptionIdName

src/util/model.ts:555–564  ·  view source on GitHub ↗
(idOrName: unknown, defaultValue: string)

Source from the content-addressed store, hash-verified

553}
554
555export function convertOptionIdName(idOrName: unknown, defaultValue: string): string {
556 if (idOrName == null) {
557 return defaultValue;
558 }
559 return isString(idOrName)
560 ? idOrName
561 : (isNumber(idOrName) || isStringSafe(idOrName))
562 ? idOrName + ''
563 : defaultValue;
564}
565
566function warnInvalidateIdOrName(idOrName: unknown) {
567 if (__DEV__) {

Callers 10

createGraphFromNodeEdgeFunction · 0.90
_prepareMethod · 0.90
prepareTextFunction · 0.90
_initDataMethod · 0.90
_doInitMethod · 0.90
SeriesDataClass · 0.90
buildHierarchyMethod · 0.90
keyExistAndEqualFunction · 0.85
makeComparableKeyFunction · 0.85
makeMapFunction · 0.85

Calls 1

isNumberFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…