Skip to main content
Glama
node16-polyfills.js1.09 kB
// Node.js 16 polyfills for modern web APIs // This file should be required before any other code runs // Polyfill for ReadableStream if (typeof globalThis.ReadableStream === 'undefined') { const { Readable } = require('stream'); globalThis.ReadableStream = class ReadableStream { constructor(underlyingSource = {}) { this._readable = new Readable({ read: underlyingSource.pull, objectMode: true }); if (underlyingSource.start) { underlyingSource.start(this); } } getReader() { return { read: async () => { return new Promise((resolve) => { this._readable.once('data', (chunk) => { resolve({ value: chunk, done: false }); }); this._readable.once('end', () => { resolve({ value: undefined, done: true }); }); }); }, releaseLock: () => {} }; } }; } // Other polyfills can be added as needed // Export to ensure this file is properly loaded as a module module.exports = {};

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/watercrawl/watercrawl-mcp'

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