cjs/index.js
function encode(data) {
	const bytes = buffer.Buffer.from(data, 'utf8');
	const pixelData = prependLength(bytes);

	return createPng(pixelData);
}
function encode(data) {
	const bytes = buffer.Buffer.from(data, 'utf8');
	const pixelData = prependLength(bytes);

	return createPng(pixelData);
}
function encode ( data ) { const bytes = buffer . Buffer . from ( data , 'utf8' ) ; const pixelData = prependLength ( bytes ) ; return createPng ( pixelData ) ; }
Encode the given data to png.

@param {string} data
@returns {Promise<Buffer>}
Encode the given data to png .