Skip to content
This repository was archived by the owner on Aug 31, 2024. It is now read-only.
This repository was archived by the owner on Aug 31, 2024. It is now read-only.

Passing argument not working? #7

@basickarl

Description

@basickarl

First off, I do not know if this belongs here in this module, but I'll start here. I'm experimenting with the following code:

var convert = require('koa-convert');
var genbind = require('generator-bind');

function* myGen(i) {
    console.log(this.x, i);
}
myGen = genbind({x:666}, myGen);
convert(myGen)(9); // <--- this outputs 666 undefined, was expecting 666 9

I can't seem to pass an argument to the generator function. If this isn't to do with koa-convert then I'm guessing generator-bind is at fault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions