UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

12 lines (11 loc) 462 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isGeneratorObject = void 0; /** * Determines whether the given value is a generator object. */ function isGeneratorObject(value) { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return typeof value.throw === 'function' && typeof value.return === 'function' && typeof value.next === 'function'; } exports.isGeneratorObject = isGeneratorObject;