MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / typeToIcon

Function typeToIcon

lib/web/CodeMirror/addon/tern/tern.js:242–250  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

240 }
241
242 function typeToIcon(type) {
243 var suffix;
244 if (type == "?") suffix = "unknown";
245 else if (type == "number" || type == "string" || type == "bool") suffix = type;
246 else if (/^fn\(/.test(type)) suffix = "fn";
247 else if (/^\[/.test(type)) suffix = "array";
248 else suffix = "object";
249 return cls + "completion " + cls + "completion-" + suffix;
250 }
251
252 // Type queries
253

Callers 1

hintFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected