Skip to main content
Glama
apply.js•697 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.safeApply = safeApply; const untouchedApply = Function.prototype.apply; const ApplySymbol = Symbol('apply'); function safeExtractApply(f) { try { return f.apply; } catch (err) { return undefined; } } function safeApplyHacky(f, instance, args) { const ff = f; ff[ApplySymbol] = untouchedApply; const out = ff[ApplySymbol](instance, args); delete ff[ApplySymbol]; return out; } function safeApply(f, instance, args) { if (safeExtractApply(f) === untouchedApply) { return f.apply(instance, args); } return safeApplyHacky(f, instance, args); }

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/Digital-Defiance/mcp-screenshot'

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