Skip to content

Remove buffer? #25

Closed
Closed

Description

@jimmywarting

Could you make this less dependent on node stuff?

Would like to see a major update where Uint8Array is returned instead on both node and browser.
Buffer is unnecessary in many cases where it's just seen as a Uint8Array. And where many node core feature is more acceptable of typed arrays instead
So including Buffer (safe-buffer) in the browser is just bloated and unnecessary.

Think if ppl need a Buffer then they should use Buffer.from(randombytes(1)) instead.


Can make a PR if you wish

Activity

  1. dcousens commented on Jul 26, 2023

    @dcousens
    Member

    safe-buffer has been removed in #27

  2. dcousens commented on Jul 26, 2023

    @dcousens
    Member

    @jimmywarting I understand your reasoning, but I don't think we want to broaden the scope of this package when it should always produce the same output and types as node.

    Unfortunately this package is called randombytes, and not @browserify/randombytes, but, it's likely package scopes weren't available when the project started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions