Skip to main content
Glama
promise.js598 B
'use strict' const { kTestInternals } = require('./symbols') function withResolvers () { let res, rej const promise = new Promise((resolve, reject) => { res = resolve rej = reject }) return { promise, resolve: res, reject: rej } } module.exports = { // TODO(20.x): remove when node@20 is not supported withResolvers: typeof Promise.withResolvers === 'function' ? Promise.withResolvers.bind(Promise) // Promise.withResolvers must bind to itself /* c8 ignore next */ : withResolvers, // Tested using the kTestInternals [kTestInternals]: { withResolvers } }

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/krtw00/search-mcp'

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