rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
13 lines • 352 B
JavaScript
const tmp = ["0x", 0];
/**
* @public
* Returns the hex representation of the number. If it's not a number it returns "NaN".
*/
export function numberGetHexString(value) {
if (value !== value) {
return "NaN";
}
tmp[1] = value.toString(16).toUpperCase();
return tmp.join("");
}
//# sourceMappingURL=number-get-hex-string.js.map