Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/samualtnorman/lib. A collection of common utilities I need. www.npmjs.com/package/@samual/lib
Something went wrong. Try again.
12345678// eslint-disable-next-line @typescript-eslint/no-empty-function -- dummy generator functionconst generatorPrototype = Object.getPrototypeOf((function* () {})())
export const isGenerator = (value: unknown): value is Generator => Boolean(value) && Object.getPrototypeOf(value) == generatorPrototype
export default isGenerator