Skip to main content
Module

x/lume/core/utils/generator.ts

πŸ”₯ Static site generator for Deno πŸ¦•
Very Popular
Go to Latest
File
/** * 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");}