Open ggorlen opened 6 months ago
Does the name matter? Regardless, more detailed instructions would be helpful for beginners like myself. It sounds like you are extending puppeteer so this is meant to drop in to replace it.
@eng3 Yes, it matters. I'm not extending Puppeteer, I'm just trying to answer your stack overflow question, but I wasn't able to easily determine what the library does or understand how to install/import it.
Beyond the name, the convention is to capitalize constructors, so I'd suggest new DefinitelyNotARobot()
.
Now that you mention it, extending Puppeteer is the correct way to design a package like this. Hiding It seems to be--my mistake.browser.launch()
as this library does makes it more or less unusable, because being able to specify launch options is a critical piece of functionality that needs to be exposed.
Fwiw I think, but can't remember, that I made it possible to swap your own Puppeteer instance in - If I didn't then I definitely should have.
Again, I'll get to this next week - apologies for the delay, I'm without a machine ✌️
On Tue, 12 Mar 2024, 18:29 ggorlen, @.***> wrote:
@eng3 https://github.com/eng3 Yes, it matters. I'm not extending Puppeteer, I'm just trying to answer your stack overflow question https://stackoverflow.com/questions/78148272/how-can-i-use-typescript-code-in-an-existing-node-project, but I wasn't able to easily determine what the library does or understand how to install/import it.
Now that you mention it, extending Puppeteer is the correct way to design a package like this. Hiding browser.launch() as this library does makes it more or less unusable, because being able to specify launch options is a critical piece of functionality that needs to be exposed.
— Reply to this email directly, view it on GitHub https://github.com/dougwithseismic/npm-definitely-not-a-robot/issues/2#issuecomment-1992074785, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSIKRBXXDGWNN64HV2EN23YX4UPVAVCNFSM6AAAAABESP3KBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJSGA3TINZYGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>
@ggorlen I wasnt sure how to install/import it either hence why I asked the question. As for the broader question of why anyone needs this package at all, I don't know. I'm running out of ideas thus thought something like this was worth a try. I didn't want to list the site by name in order to attempt to keep some anonymity due to the nature of this type of thing
From the readme:
Why would we want to call this variable "definitely not a human" (i.e., a robot)? Shouldn't this be
import definitelyNotARobot from 'path-to-definitely-not-a-robot'
?Also,
path-to-definitely-not-a-robot
is usually the actual package name.I realize that
is an attempt at humor, but it's very confusing. I suggest just stating what the library does simply.