Closed adnathanail closed 1 year ago
Thank you for the issue! Yes, this helper function is currently missing and i will include it in the next release. I also already have similar code in my nfc demo app: https://github.com/capawesome-team/capacitor-nfc-demo/blob/main/src/app/shared/pipes/bytes-to-hex/bytes-to-hex.pipe.ts
This will be part of v0.3.1
.
Is your feature request related to a problem? Please describe: I'm coming from using this old NFC reading package
https://github.com/chariotsolutions/phonegap-nfc
And it had a util function called
toHex
which converted a byte to its equivalent character in hexadecimalhttps://github.com/chariotsolutions/phonegap-nfc/blob/d325b860af64869e4b6d7996c37d61d2492310d5/www/phonegap-nfc.js#L591
I extended this to convert an array of bytes to a string of hex chars joined by
':'
which is a common representation format for an NFC IDDescribe the solution you'd like: I've rewritten this function to have a consistent API with
convertBytesToString
If you think it could be generally useful to others, feel free to include it!