mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2025-02-09 15:30:25 +00:00
7 lines
193 B
JavaScript
7 lines
193 B
JavaScript
function hex(value, size) {
|
|
if(size === undefined) size = 2;
|
|
let s = "0".repeat(size) + value.toString(16);
|
|
return s.substr(s.length - size).toUpperCase();
|
|
}
|
|
|
|
module.exports = { hex }; |