MCPcopy Index your code
hub / github.com/modelcontextprotocol/inspector / getDataType

Function getDataType

client/src/utils/jsonUtils.ts:78–82  ·  view source on GitHub ↗
(value: JsonValue)

Source from the content-addressed store, hash-verified

76 * @returns The specific data type including "array" and "null" as distinct types
77 */
78export function getDataType(value: JsonValue): DataType {
79 if (Array.isArray(value)) return "array";
80 if (value === null) return "null";
81 return typeof value;
82}
83
84/**
85 * Attempts to parse a string as JSON, only for objects and arrays

Callers 2

JsonView.tsxFile · 0.90
jsonUtils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…