staticrypt icon indicating copy to clipboard operation
staticrypt copied to clipboard

Cleanup browser version of HexEncoder

Open jimhark opened this issue 5 months ago • 0 comments

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.

jimhark avatar Jul 21 '25 02:07 jimhark