sayem314 / hooman

http interceptor to hoomanize cloudflare requests
https://www.npmjs.com/package/hooman
MIT License
146 stars 18 forks source link

expose `got` as decorator #1

Closed Kikobeats closed 4 years ago

Kikobeats commented 4 years ago

Hello,

Do you think it could be possible to expose a more affordable interface in order to prevent get got locked by this package?

This is the thing I have on mind:

const got = require('hooman')(require('got')
sayem314 commented 4 years ago

It's possible with peer dependencies but anything wrong this locked version to latest?

Kikobeats commented 4 years ago

Jut suggesting because got tends to release new versions very often.

Locking to 11.x version isn't the best approach, they sometimes introduce bug accidentally.

Using the decoratr approach you're moving the responsibility out of the library.

sayem314 commented 4 years ago

Will provide it as a peer dependency on next version :)

Kikobeats commented 4 years ago

Thanks a lot!