(value: JsonValue)
| 76 | * @returns The specific data type including "array" and "null" as distinct types |
| 77 | */ |
| 78 | export 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…