Skip to content

ReadableStreamBYOBReader dependency overstated #789

@pether-nxd

Description

@pether-nxd

In the readme section about fileTypeFromBlob, it's stated:

[!WARNING] This method depends on ReadableStreamBYOBReader which requires Node.js ≥ 20 
and may not be available in all modern browsers.

However, the function seems to work well in Safari 18.6, despite it lacking support for said Reader.

The only dependency on ReadableStreamBYOBReader that I can find is in the strtok3 library, but its WebStreamReaderFactory.ts seems to contain fallbacks in case byob support is missing.

Is the documentation in the readme perhaps outdated? I notice the relevant section was last updated two years ago while WebStreamReaderFactory.ts was added in a big commit only seven months ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions