index.js
function handleQueue() {
		const count = commandQueue.length

		if (count>0) {
			const packet = new UserPacket(commandQueue.slice(0));
			commandQueue = [];

			packet.transmit();
		}

		return count
	}
function handleQueue() {
		const count = commandQueue.length

		if (count>0) {
			const packet = new UserPacket(commandQueue.slice(0));
			commandQueue = [];

			packet.transmit();
		}

		return count
	}
function handleQueue ( ) { const count = commandQueue . length if ( count > 0 ) { const packet = new UserPacket ( commandQueue . slice ( 0 ) ) ; commandQueue = [ ] ; packet . transmit ( ) ; } return count }
Sends a packet with all the remaining command of the commandQueue
Sends a packet with all the remaining command of the commandQueue