Skip to content

Cleanup browser version of HexEncoder #220

@jimhark

Description

@jimhark

Proposed

HexEncoder parse() and stringify() could be freshened up.

  • parse()
    • simplify var names
    • Minor reformatting
    • Throw Error() object, not string
  • stringify()
    • Pad hex using .padStart(2, "0")
    • use .map().join("") to build hex string.

Alternatives Considered

Could leave as is, this is just a freshen up.

Note

PR is being prepaired.

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