Skip to main content
Glama
map.js664 B
import { inspectList } from './helpers' function inspectMapEntry([key, value], options) { options.truncate -= 4 key = options.inspect(key, options) options.truncate -= key.length value = options.inspect(value, options) return `${key} => ${value}` } // IE11 doesn't support `map.entries()` function mapToEntries(map) { const entries = [] map.forEach((value, key) => { entries.push([key, value]) }) return entries } export default function inspectMap(map, options) { const size = map.size - 1 if (size <= 0) { return 'Map{}' } options.truncate -= 7 return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }` }

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