const isUint32 = (x: number): x is Uint32 =>
Number.isSafeInteger(x) && x >= 0 && x <= 2**32 - 1;
const color = (rgba: Uint32) => ({ rgba });
const ipAddress = (ip: Uint32) => {
// Convert to dotted decimal notation
return `${ip >>> 24}.${(ip >>> 16) & 0xff}.${(ip >>> 8) & 0xff}.${ip & 0xff}`;
};
Branded numeric type for 32-bit unsigned integers. Range: [0, 2^32 - 1] or [0, 4,294,967,295]