Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Should I make this a proper package and publish it to npm? #1

Open
simonplend opened this issue Dec 11, 2021 · 0 comments
Open

Should I make this a proper package and publish it to npm? #1

simonplend opened this issue Dec 11, 2021 · 0 comments

Comments

@simonplend
Copy link
Owner

simonplend commented Dec 11, 2021

The AbortSignal.timeout method will hopefully be getting backported to the Node.js 16.x release line in the near future. This allows you to cleanly implement a timeout for an HTTP request with fetch e.g.

const response = await fetch(url, { signal: AbortSignal.timeout(10_000) });

That would potentially make this library redundant. However, it could still be useful for anyone using >= v16.0.0 and < than the v16.x.x release when AbortSignal.timeout is backported. This would be true for people using serverless runtimes such as Google Cloud Functions and AWS Lambda where you can only control the Node.js major version.

Making this library a "proper" package would involve:

  • Adding tests (!)
  • Adding types
  • Improving the documentation
  • Publishing it to npm

If you would find this library helpful, please let me know by dropping a 👍🏻 reaction on this issue!

@simonplend simonplend changed the title Decide whether to develop this package further Should I make this a proper package and publish it to npm? Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant