Skip to content

Improve compatibility with browser by using better APIs #275

@fregante

Description

@fregante

The browser compatibility claimed by this package is only due to bundlers’ polyfills, which are increasingly missing:

http and https can be replaced by fetch, which is available in Node 18 and can already be used everywhere with https://github.com/matthew-andrews/isomorphic-fetch. I think this would also avoid Buffer issues

URLs can be parsed with the URL constructor, available globally in Node 10.

They can all be replaced by their modern and cross-platform equivalents or they can use something like globalThis.process?.platform to ensure that they don't immediately fail when missing.

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