source/QR.js
function ratio(options) {
	const { width, height } = options;

	if ((width || height) && !(width && height)) {
		if (width) {
			options.height = width;
		}
		if (height) {
			options.width = height;
		}
	}

	return options;
}
function ratio(options) {
	const { width, height } = options;

	if ((width || height) && !(width && height)) {
		if (width) {
			options.height = width;
		}
		if (height) {
			options.width = height;
		}
	}

	return options;
}
function ratio ( options ) { const { width , height } = options ; if ( ( width || height ) && ! ( width && height ) ) { if ( width ) { options . height = width ; } if ( height ) { options . width = height ; } } return options ; }
Determine the correct "opposite" dimension in case only one of width or height is provided

@param   {object} options
@returns {object} options
Determine the correct opposite dimension in case only one of width or height is provided