deno.land / x / grammy@v1.22.4 / platform.web.ts

platform.web.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import d from "https://cdn.skypack.dev/debug@4.3.4";export { d as debug };
// === Export system-specific operations// Turn an AsyncIterable<Uint8Array> into a streamexport const itrToStream = (itr: AsyncIterable<Uint8Array>) => { // do not assume ReadableStream.from to exist yet const it = itr[Symbol.asyncIterator](); return new ReadableStream({ async pull(controller) { const chunk = await it.next(); if (chunk.done) controller.close(); else controller.enqueue(chunk.value); }, });};
// === Base configuration for `fetch` callsexport const baseFetchConfig = (_apiRoot: string) => ({});
export const defaultAdapter = "cloudflare";
grammy

Version Info

Tagged at
a month ago