mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2024-06-03 12:29:30 +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 };
|