Skip to main content
Glama
class.js597 B
import getFuncName from 'get-func-name' import inspectObject from './object' const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false export default function inspectClass(value, options) { let name = '' if (toStringTag && toStringTag in value) { name = value[toStringTag] } name = name || getFuncName(value.constructor) // Babel transforms anonymous classes to the name `_class` if (!name || name === '_class') { name = '<Anonymous Class>' } options.truncate -= name.length return `${name}${inspectObject(value, options)}` }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yogendhra9/ZerodhaMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server