encode_BYTE function

dynamic encode_BYTE(
  1. dynamic v
)

Convert an 8-bit unsigned integer to a list of 1 byte. @param {number} @returns {Array}

Implementation

encode_BYTE (v) {
    argument(v >= 0 && v <= 255, 'Byte value should be between 0 and 255.');
    return [v];
}