staticrypt
staticrypt copied to clipboard
Cleanup browser version of HexEncoder
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.