fromPromise
import { fromPromise } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_iterable.ts";Create an AsyncIterable from a Promise that resolves to a single value.
@example
import { fromPromise } from "./async_iterable.ts";
const promise = Promise.resolve("Hello");
const asyncIter = fromPromise(promise);
for await (const value of asyncIter) {
console.log(value); // "Hello"
}
function fromPromise<A>(ua: Promise<A>): AsyncIterable<A>;