Skip to main content
Glama
index.js•744 B
'use strict'; var define = require('define-data-property'); var hasDescriptors = require('has-property-descriptors')(); var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); var $TypeError = require('es-errors/type'); /** @type {import('.')} */ module.exports = function setFunctionName(fn, name) { if (typeof fn !== 'function') { throw new $TypeError('`fn` is not a function'); } var loose = arguments.length > 2 && !!arguments[2]; if (!loose || functionsHaveConfigurableNames) { if (hasDescriptors) { define(/** @type {Parameters<define>[0]} */ (fn), 'name', name, true, true); } else { define(/** @type {Parameters<define>[0]} */ (fn), 'name', name); } } return fn; };

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/guangxiangdebizi/PPT-MCP'

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