cjs/index.js
function prependLength(data) {
	const lengthAsBytes = buffer.Buffer.alloc(4);

	lengthAsBytes.writeUInt32BE(data.length);

	return buffer.Buffer.concat([lengthAsBytes, data]);
}
function prependLength(data) {
	const lengthAsBytes = buffer.Buffer.alloc(4);

	lengthAsBytes.writeUInt32BE(data.length);

	return buffer.Buffer.concat([lengthAsBytes, data]);
}
function prependLength ( data ) { const lengthAsBytes = buffer . Buffer . alloc ( 4 ) ; lengthAsBytes . writeUInt32BE ( data . length ) ; return buffer . Buffer . concat ( [ lengthAsBytes , data ] ) ; }
Prepend length to the data.

@param data
@returns {Buffer}
Prepend length to the data .