Skip to main content
Glama
humanize.ts468 B
export type HumanizeNumberOptions = { /** * @example 1000 => 1,000 * @default "," */ delimiter?: string; /** * @example 1.1 * @default "." */ separator?: string; }; export function humanizeNumber(n: number, options: HumanizeNumberOptions = {}) { const d = options.delimiter || ','; const s = options.separator || '.'; const ns = n.toString().split('.'); if (ns[0]) ns[0] = ns[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + d); return ns.join(s); }

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/mrgoonie/reviewwebsite-mcp-server'

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