deno.land / x / lume@v2.1.4 / core / utils / generator.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/** * Check if the content variable is a generator. */export function isGenerator( content: unknown,): content is GeneratorFunction | AsyncGeneratorFunction { if (typeof content !== "function") { return false; }
const name = content.constructor.name; return (name === "GeneratorFunction" || name === "AsyncGeneratorFunction");}
lume

Version Info

Tagged at
7 months ago