Skip to main content
Glama
firstValueFrom.js•784 B
import { EmptyError } from './util/EmptyError'; import { SafeSubscriber } from './Subscriber'; export function firstValueFrom(source, config) { var hasConfig = typeof config === 'object'; return new Promise(function (resolve, reject) { var subscriber = new SafeSubscriber({ next: function (value) { resolve(value); subscriber.unsubscribe(); }, error: reject, complete: function () { if (hasConfig) { resolve(config.defaultValue); } else { reject(new EmptyError()); } }, }); source.subscribe(subscriber); }); } //# sourceMappingURL=firstValueFrom.js.map

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/samihalawa/brevo-mcp'

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