MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / buffer2hexlist

Function buffer2hexlist

tools/bles2gatt.js:1731–1740  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

1729}
1730
1731function buffer2hexlist(buffer) {
1732 let byteArray = new Uint8Array(buffer);
1733 let hexParts = [];
1734 for (let i = 0; i < byteArray.length; i++) {
1735 let hex = byteArray[i].toString(16);
1736 let padded = ("00" + hex).slice(-2);
1737 hexParts.push("0x" + padded);
1738 }
1739 return hexParts.join(", ");
1740}
1741
1742function toPaddedHex(value) {
1743 return "0x" + ("00" + value.toString(16)).slice(-2);

Callers 9

generateMethod · 0.85
writeAttributeValueMethod · 0.85
writeAttributeUUIDMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
generateMethod · 0.85
writeAttributeValueMethod · 0.85
writeAttributeUUIDMethod · 0.85

Calls 3

sliceMethod · 0.65
toStringMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected