UNPKG

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.

17 lines 508 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.numberGetHexString = void 0; const tmp = ["0x", 0]; /** * @public * Returns the hex representation of the number. If it's not a number it returns "NaN". */ function numberGetHexString(value) { if (value !== value) { return "NaN"; } tmp[1] = value.toString(16).toUpperCase(); return tmp.join(""); } exports.numberGetHexString = numberGetHexString; //# sourceMappingURL=number-get-hex-string.js.map