Skip to content

AsyncFunction and GeneratorFunction issues #103

Open
@doasync

Description

@doasync

I think, tests should pass:

const type = require('type-detect');
const assert = require('assert');

const asyncFn = async () => {};
const generatorFn = function* generator () {};

function getTag(obj) {
  return Object.prototype.toString.call(obj).slice(8, -1);
}

assert(type(asyncFn) === getTag(asyncFn));
assert(type(generatorFn) === getTag(generatorFn));

Is it a bug? If not, you should add it to README.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions