{"version":3,"file":"isGenerator.cjs","sources":["../../src/types/isGenerator.ts"],"sourcesContent":["import { constructorName } from './helpers';\n\n/**\n * Determines whether the given value is a generator object.\n */\nexport function isGeneratorObject(value: any): boolean {\n  return (\n    typeof value.throw === 'function' &&\n    typeof value.return === 'function' &&\n    typeof value.next === 'function'\n  );\n}\n\nexport function isGeneratorFunction(\n  value: any,\n): value is GeneratorFunction {\n  const name = constructorName(value);\n\n  return name === 'GeneratorFunction' || name === 'GeneratorFunction.js';\n}\n"],"names":["constructorName"],"mappings":";;;;AAEA;;AAEG;AACG,SAAU,iBAAiB,CAAC,KAAU,EAAA;AAC1C,IAAA,QACE,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;AACjC,QAAA,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU;AAClC,QAAA,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,EAChC;AACJ,CAAC;AAEK,SAAU,mBAAmB,CACjC,KAAU,EAAA;AAEV,IAAA,MAAM,IAAI,GAAGA,uBAAe,CAAC,KAAK,CAAC,CAAC;AAEpC,IAAA,OAAO,IAAI,KAAK,mBAAmB,IAAI,IAAI,KAAK,sBAAsB,CAAC;AACzE;;;;;"}