Creates a byte size in kilobytes.
WHY: Provides a more readable way to specify sizes in KB.
number of kilobytes
bytes equivalent
const maxSize = kilobytes(500); // 500 KB = 512000 bytesif (buffer.length > kilobytes(100)) console.log('Buffer too large'); Copy
const maxSize = kilobytes(500); // 500 KB = 512000 bytesif (buffer.length > kilobytes(100)) console.log('Buffer too large');
Creates a byte size in kilobytes.
WHY: Provides a more readable way to specify sizes in KB.