Last 12 weeks · 0 commits
1 of 6 standards met
Hi, I'm still a JS newbie, and very much a n00b to generators, , and . Probably, I'm making a silly error, but my Google-fu is failing me, so I'm hoping for a pointer in the right direction.. I get a "TypeError: object is not a function" when trying the example in https://github.com/tj/co-monk/tree/67a867016c945ea9cb6cafdc8b5c97788b797ac5 (using so that won't get an error): Here's my code: What am I doing wrong? Running , and get the same error with or without option.
Repository: tj/co-monk. Description: MongoDB generator goodness for node.js Stars: 154, Forks: 13. Primary language: JavaScript. Languages: JavaScript (100%). Open PRs: 1, open issues: 4. Last activity: 10y ago. Community health: 28%. Top contributors: tj.
Because the "SyntaxError: Unexpected identifier" trips me up every time.
I grew tired writing the same four lines over and over again, so I started to implement a little helper function in my projects. After a while I thought that it might be a nice addition to the co-monk project itself. So instead of doing you can now just go which is a bit nicer I think. Preferably I wanted to create an overload constructor, eliminating the need for the function call, but my Node knowledge failed me. Especially with the funky "looping over methods and thunkify them" thing that was going on. If you think that would be better, please give me some pointers and I'll try to fix it up. I was starting to think if monk itself now can be hidden by this project. Are you only using the helper method there's not use for the database. I have created a method to return the monk database too, btw. But for the client using co-monk you should not need to use monk. I have also updated the README to reflect the changes. HTH